8225182: JNI exception pending in DestroyXIMCallback of awt_InputMethod.c:1327

Reviewed-by: serb
This commit is contained in:
Naoto Sato 2019-06-05 16:10:08 -07:00
parent d69bc696f2
commit aa43d1ab22

@ -1329,7 +1329,15 @@ static void DestroyXIMCallback(XIM im, XPointer client_data, XPointer call_data)
/* free the old pX11IMData and set it to null. this also avoids crashing
* the jvm if the XIM server reappears */
while (x11InputMethodGRefListHead != NULL) {
getX11InputMethodData(env, x11InputMethodGRefListHead->inputMethodGRef);
if (getX11InputMethodData(env,
x11InputMethodGRefListHead->inputMethodGRef) == NULL) {
/* Clear possible exceptions
*/
if ((*env)->ExceptionOccurred(env)) {
(*env)->ExceptionDescribe(env);
(*env)->ExceptionClear(env);
}
}
}
AWT_UNLOCK();
}