Skip to content

Commit 1eb4da3

Browse files
committed
Fix: PException may have no exception object.
1 parent 76c7a0e commit 1eb4da3

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/exception/PException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public int getStackTraceElementLimit() {
119119

120120
@Override
121121
public boolean isSyntaxError() {
122-
return IsBuiltinClassProfile.profileClassSlowPath(getExceptionObject().getLazyPythonClass(), PythonBuiltinClassType.SyntaxError);
122+
return pythonException != null && IsBuiltinClassProfile.profileClassSlowPath(pythonException.getLazyPythonClass(), PythonBuiltinClassType.SyntaxError);
123123
}
124124

125125
public void setIncompleteSource(boolean val) {

0 commit comments

Comments
 (0)