Skip to content

Commit b11e50a

Browse files
committed
Transfer C++ SDK segfault fix to SDK V3 (#13761)
1 parent 22703cd commit b11e50a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/client/table/table.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,13 +1365,15 @@ TScanQueryPartIterator::TScanQueryPartIterator(
13651365
{}
13661366

13671367
TAsyncScanQueryPart TScanQueryPartIterator::ReadNext() {
1368-
if (ReaderImpl_->IsFinished())
1368+
if (!ReaderImpl_ || ReaderImpl_->IsFinished()) {
1369+
if (!IsSuccess())
1370+
RaiseError(TStringBuilder() << "Attempt to perform read on an unsuccessful result "
1371+
<< GetIssues().ToString());
13691372
RaiseError("Attempt to perform read on invalid or finished stream");
1373+
}
13701374
return ReaderImpl_->ReadNext(ReaderImpl_);
13711375
}
13721376

1373-
1374-
13751377
static bool IsSessionStatusRetriable(const TCreateSessionResult& res) {
13761378
switch (res.GetStatus()) {
13771379
case EStatus::OVERLOADED:

0 commit comments

Comments
 (0)