Skip to content

Commit 3047938

Browse files
authored
check iterator before use (#9264)
1 parent efd8a43 commit 3047938

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ydb/library/yql/ast/yql_expr.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,9 @@ namespace {
19101910
case TExprNode::Lambda:
19111911
{
19121912
const auto prevFrame = ctx.CurrentFrame;
1913-
ctx.CurrentFrame = &ctx.Frames[ctx.LambdaFrames.find(&node)->second];
1913+
const auto it = ctx.LambdaFrames.find(&node);
1914+
YQL_ENSURE(it != ctx.LambdaFrames.end());
1915+
ctx.CurrentFrame = &ctx.Frames[it->second];
19141916
YQL_ENSURE(node.ChildrenSize() > 0U);
19151917
const auto& args = node.Head();
19161918
TSmallVec<TAstNode*> argsChildren;

0 commit comments

Comments
 (0)