Skip to content

Commit 9157632

Browse files
committed
Allow NULL for native_type_to_java
1 parent 34f1775 commit 9157632

File tree

1 file changed

+3
-0
lines changed
  • graalpython/com.oracle.graal.python.cext/src

1 file changed

+3
-0
lines changed

graalpython/com.oracle.graal.python.cext/src/capi.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ PyObject* native_to_java_stealing(PyObject* obj) {
262262

263263
MUST_INLINE
264264
PyTypeObject* native_type_to_java(PyTypeObject* type) {
265+
if (type == NULL) {
266+
return NULL;
267+
}
265268
if (points_to_handle_space(type)) {
266269
return (PyTypeObject *)resolve_handle(type);
267270
}

0 commit comments

Comments
 (0)