Skip to content

Commit 2e4db93

Browse files
committed
ImportStarNode: test for null pyFrame
1 parent 2c19c19 commit 2e4db93

File tree

1 file changed

+4
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/statement

1 file changed

+4
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/statement/ImportStarNode.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ public void executeVoid(VirtualFrame frame) {
113113
Object customLocals = PArguments.getCustomLocals(frame);
114114
if (haveCustomLocals.profile(customLocals != null)) {
115115
assert customLocals instanceof PFrame.Reference;
116-
locals = (PythonObject) ((PFrame.Reference) customLocals).getPyFrame().getLocals(factory());
116+
PFrame pyFrame = ((PFrame.Reference) customLocals).getPyFrame();
117+
if (pyFrame != null) {
118+
locals = (PythonObject) pyFrame.getLocals(factory());
119+
}
117120
}
118121

119122
if (javaImport.profile(emulateJython() && getContext().getEnv().isHostObject(importedModule))) {

0 commit comments

Comments
 (0)