src/hotspot/share/prims/jni.cpp
changeset 48808 2b0b7f222800
parent 48787 7638bf98a312
child 48819 ee513596f3ee
--- a/src/hotspot/share/prims/jni.cpp	Fri Jan 19 17:01:34 2018 +0100
+++ b/src/hotspot/share/prims/jni.cpp	Tue Jan 23 14:27:10 2018 -0500
@@ -862,7 +862,10 @@
 
   HOTSPOT_JNI_GETOBJECTREFTYPE_ENTRY(env, obj);
 
-  jobjectRefType ret = JNIHandles::handle_type(thread, obj);
+  jobjectRefType ret = JNIInvalidRefType;
+  if (obj != NULL) {
+    ret = JNIHandles::handle_type(thread, obj);
+  }
 
   HOTSPOT_JNI_GETOBJECTREFTYPE_RETURN((void *) ret);
   return ret;