From 544c926b1817232841d97e30f0dc074392ed156c Mon Sep 17 00:00:00 2001 From: omajid Date: Mon, 27 Sep 2010 11:30:03 -0400 Subject: [PATCH] 6986968: Crash on XIM server restart Summary: Free XIM data structures on DestroyXIMCallback Reviewed-by: naoto --- src/solaris/native/sun/awt/awt_InputMethod.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/solaris/native/sun/awt/awt_InputMethod.c b/src/solaris/native/sun/awt/awt_InputMethod.c index fbaf35cff..549e51986 100644 --- a/src/solaris/native/sun/awt/awt_InputMethod.c +++ b/src/solaris/native/sun/awt/awt_InputMethod.c @@ -1473,6 +1473,10 @@ static void OpenXIMCallback(Display *display, XPointer client_data, XPointer cal 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); } /* -- GitLab