changeset 13174:b00553202ec2

add NULL check so that -Xint option works again
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Mon, 25 Nov 2013 15:31:18 -0800
parents 5df9c590f401
children 85b60abfd11f
files src/share/vm/prims/jni.cpp src/share/vm/runtime/java.cpp
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/jni.cpp	Mon Nov 25 15:26:08 2013 -0800
+++ b/src/share/vm/prims/jni.cpp	Mon Nov 25 15:31:18 2013 -0800
@@ -5176,7 +5176,11 @@
 #ifdef GRAAL
     // GraalCompiler needs to have been created in compileBroker.cpp
     GraalCompiler* graal_compiler = GraalCompiler::instance();
-    graal_compiler->initialize();
+    if (graal_compiler != NULL) {
+      graal_compiler->initialize();
+    } else {
+      assert(!UseCompiler, "why isn't there are compiler?");
+    }
 #endif
 
     // Tracks the time application was running before GC
--- a/src/share/vm/runtime/java.cpp	Mon Nov 25 15:26:08 2013 -0800
+++ b/src/share/vm/runtime/java.cpp	Mon Nov 25 15:31:18 2013 -0800
@@ -462,7 +462,9 @@
   static jint volatile _before_exit_status = BEFORE_EXIT_NOT_RUN;
 
 #ifdef GRAAL
-  GraalCompiler::instance()->exit();
+  if (GraalCompiler::instance() != NULL) {
+    GraalCompiler::instance()->exit();
+  }
 #endif
 
   // Note: don't use a Mutex to guard the entire before_exit(), as