diff --git a/ASTree.cpp b/ASTree.cpp index 9ddea07..6db9195 100644 --- a/ASTree.cpp +++ b/ASTree.cpp @@ -396,7 +396,7 @@ PycRef BuildFromCode(PycRef code, PycModule* mod) { // if class is a closure code, ignore this tuple PycRef tos = stack.top(); - if (tos->type() == ASTNode::NODE_LOADBUILDCLASS) { + if (tos && tos->type() == ASTNode::NODE_LOADBUILDCLASS) { break; }