Skip to content

Commit 48d1bfa

Browse files
committed
Fix a null dereference.
Fixes #486
1 parent cb32b58 commit 48d1bfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ASTree.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
396396
{
397397
// if class is a closure code, ignore this tuple
398398
PycRef<ASTNode> tos = stack.top();
399-
if (tos->type() == ASTNode::NODE_LOADBUILDCLASS) {
399+
if (tos && tos->type() == ASTNode::NODE_LOADBUILDCLASS) {
400400
break;
401401
}
402402

0 commit comments

Comments
 (0)