Skip to content

Commit 4d7f378

Browse files
committed
Fixed bug #7860 : Crash potentially caused by BETWEEN Operator
1 parent 41bd785 commit 4d7f378

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/jrd/recsrc/ConditionalStream.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ void ConditionalStream::open(thread_db* tdbb) const
5353
jrd_req* const request = tdbb->getRequest();
5454
Impure* const impure = request->getImpure<Impure>(m_impure);
5555

56-
impure->irsb_flags = irsb_open;
57-
5856
impure->irsb_next = m_boolean->execute(tdbb, request) ? m_first : m_second;
57+
58+
impure->irsb_flags = irsb_open;
5959
impure->irsb_next->open(tdbb);
6060
}
6161

@@ -71,7 +71,8 @@ void ConditionalStream::close(thread_db* tdbb) const
7171
{
7272
impure->irsb_flags &= ~irsb_open;
7373

74-
impure->irsb_next->close(tdbb);
74+
if (impure->irsb_next)
75+
impure->irsb_next->close(tdbb);
7576
}
7677
}
7778

0 commit comments

Comments
 (0)