hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 15930 b684d8cc0108
parent 15928 f9d5c6e4107f
parent 15873 5ce4f526e0ba
child 15935 50da9e5eb858
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Fri Mar 08 11:47:57 2013 -0500
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Fri Mar 08 17:49:52 2013 -0800
@@ -2178,7 +2178,11 @@
       if (impl != NULL) {
         if (!impl->is_loader_alive(is_alive)) {
           // remove this guy
-          *adr_implementor() = NULL;
+          Klass** klass = adr_implementor();
+          assert(klass != NULL, "null klass");
+          if (klass != NULL) {
+            *klass = NULL;
+          }
         }
       }
     }
@@ -3159,9 +3163,10 @@
   if (protection_domain() != NULL) {
     guarantee(protection_domain()->is_oop(), "should be oop");
   }
-  if (host_klass() != NULL) {
-    guarantee(host_klass()->is_metadata(), "should be in metaspace");
-    guarantee(host_klass()->is_klass(), "should be klass");
+  const Klass* host = host_klass();
+  if (host != NULL) {
+    guarantee(host->is_metadata(), "should be in metaspace");
+    guarantee(host->is_klass(), "should be klass");
   }
   if (signers() != NULL) {
     guarantee(signers()->is_objArray(), "should be obj array");