Skip to content

Commit 0ca0c29

Browse files
committed
Fix nullptr exception when interpreter frame is null
1 parent a25e58a commit 0ca0c29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Runtime/Library/JavascriptGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ namespace Js
375375
return;
376376
}
377377
}
378-
else
378+
else if (frame != nullptr)
379379
{
380380
int nextOffset = this->frame->GetReader()->GetCurrentOffset();
381381
int endOffset = this->frame->GetFunctionBody()->GetByteCode()->GetLength();
@@ -384,9 +384,9 @@ namespace Js
384384
{
385385
return;
386386
}
387-
SetState(GeneratorState::Completed);
388387
}
389388

389+
SetState(GeneratorState::Completed);
390390
ProcessAsyncGeneratorReturn(result, scriptContext);
391391
}
392392

0 commit comments

Comments
 (0)