Skip to content

Commit 97541a9

Browse files
committed
Fix: property can be null
1 parent 90f6af3 commit 97541a9

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1965,7 +1965,7 @@ static Object doGeneric(GraalHPyContext context, Object typeSpec, Object typeSpe
19651965
case GraalHPyDef.HPY_DEF_KIND_SLOT:
19661966
Object slotDef = callHelperFunctionNode.call(context, GRAAL_HPY_DEF_GET_SLOT, moduleDefine);
19671967
property = addSlotNode.execute(context, newType, slotDef);
1968-
if (SpecialMethodNames.__NEW__.equals(property.key)) {
1968+
if (property != null && SpecialMethodNames.__NEW__.equals(property.key)) {
19691969
seenNew = true;
19701970
}
19711971
break;

0 commit comments

Comments
 (0)