From 48d1bfa59fe910746ade2e56392965eb1939bcff Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Tue, 6 Aug 2024 08:20:25 -0700 Subject: [PATCH] Fix a null dereference. Fixes #486 --- ASTree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }