changeset 2934:bbadb9484f53

6986968: Crash on XIM server restart Summary: Free XIM data structures on DestroyXIMCallback Reviewed-by: naoto
author omajid
date Mon, 27 Sep 2010 11:30:03 -0400
parents 278c8daa3075
children 0ca4ae74cf44
files src/solaris/native/sun/awt/awt_InputMethod.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/sun/awt/awt_InputMethod.c	Mon Sep 27 13:38:49 2010 +0400
+++ b/src/solaris/native/sun/awt/awt_InputMethod.c	Mon Sep 27 11:30:03 2010 -0400
@@ -1473,6 +1473,10 @@
 static void DestroyXIMCallback(XIM im, XPointer client_data, XPointer call_data) {
     /* mark that XIM server was destroyed */
     X11im = NULL;
+    JNIEnv* env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
+    /* free the old pX11IMData and set it to null. this also avoids crashing
+     * the jvm if the XIM server reappears */
+    X11InputMethodData *pX11IMData = getX11InputMethodData(env, currentX11InputMethodInstance);
 }
 
 /*