changeset 7770:8a5fd008f98b

6866808: nsk/stress/jck12a/jck12a014 crashes with SIGSEGV at [libjvm.so+0xc5b10] Reviewed-by: art
author dcherepanov
date Mon, 27 Dec 2010 18:43:55 +0300
parents c5f95e55630d
children 9d852846c077
files jdk/src/solaris/native/sun/xawt/XToolkit.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/solaris/native/sun/xawt/XToolkit.c	Mon Dec 27 18:42:28 2010 +0300
+++ b/jdk/src/solaris/native/sun/xawt/XToolkit.c	Mon Dec 27 18:43:55 2010 +0300
@@ -187,7 +187,9 @@
                          "()Ljava/awt/Point;");
 
     keyclass = (*env)->FindClass(env, "java/awt/event/KeyEvent");
-    DASSERT (keyclass != NULL);
+    if (JNU_IsNull(env, keyclass)) {
+        return;
+    }
 
     componentIDs.isProxyActive =
         (*env)->GetFieldID(env, keyclass, "isProxyActive",
@@ -715,8 +717,10 @@
   if (xawt_root_shell == None){
       if (classXRootWindow == NULL){
           jclass cls_tmp = (*env)->FindClass(env, "sun/awt/X11/XRootWindow");
-          classXRootWindow = (jclass)(*env)->NewGlobalRef(env, cls_tmp);
-          (*env)->DeleteLocalRef(env, cls_tmp);
+          if (!JNU_IsNull(env, cls_tmp)) {
+              classXRootWindow = (jclass)(*env)->NewGlobalRef(env, cls_tmp);
+              (*env)->DeleteLocalRef(env, cls_tmp);
+          }
       }
       if( classXRootWindow != NULL) {
           methodGetXRootWindow = (*env)->GetStaticMethodID(env, classXRootWindow, "getXRootWindow", "()J");