6866808: nsk/stress/jck12a/jck12a014 crashes with SIGSEGV at [libjvm.so+0xc5b10]
Reviewed-by: art
--- 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");