hotspot/src/share/vm/ci/ciInstanceKlass.cpp
changeset 31037 01a5c5fa5681
parent 28933 a11a29cf06d5
child 31519 bb26c50aadd0
--- a/hotspot/src/share/vm/ci/ciInstanceKlass.cpp	Fri May 15 19:21:46 2015 +0300
+++ b/hotspot/src/share/vm/ci/ciInstanceKlass.cpp	Fri May 15 19:23:11 2015 +0300
@@ -453,8 +453,12 @@
 
   if (fields == NULL) {
     // This can happen if this class (java.lang.Class) has invisible fields.
-    _nonstatic_fields = super_fields;
-    return super_fields->length();
+    if (super_fields != NULL) {
+      _nonstatic_fields = super_fields;
+      return super_fields->length();
+    } else {
+      return 0;
+    }
   }
 
   int flen = fields->length();