Skip to content

Commit e824f24

Browse files
committed
Avoid NPE in sys._getframe
1 parent 5067fec commit e824f24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/frame/ReadCallerFrameNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private PFrame.Reference walkLevels(VirtualFrame frame, PFrame.Reference startFr
131131
return PArguments.getCurrentFrameInfo(callerFrame);
132132
}
133133
return PFrame.Reference.EMPTY;
134-
} else if (!(skipInternal && PRootNode.isPythonInternal(callerInfo.getCallNode().getRootNode()))) {
134+
} else if (!(skipInternal && (callerInfo.getCallNode() == null || PRootNode.isPythonInternal(callerInfo.getCallNode().getRootNode())))) {
135135
i++;
136136
}
137137
currentFrame = callerInfo;

0 commit comments

Comments
 (0)