Skip to content

Commit 4025521

Browse files
committed
[GR-35198] Fix PNode#getScope to work with null frame
PullRequest: graalpython/2037
2 parents 9262aa4 + 79135bf commit 4025521

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/PNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ final boolean hasScope(@SuppressWarnings("unused") Frame frame) {
9393
@ExportMessage
9494
final Object getScope(Frame frame, @SuppressWarnings("unused") boolean nodeEnter) throws UnsupportedMessageException {
9595
if (hasScope(frame)) {
96-
return PythonScopes.create(this, frame.materialize());
96+
return PythonScopes.create(this, frame != null ? frame.materialize() : null);
9797
} else {
9898
throw UnsupportedMessageException.create();
9999
}

0 commit comments

Comments
 (0)