OpenJDK / amber / amber
changeset 56627:e2987b9baa93
8225182: JNI exception pending in DestroyXIMCallback of awt_InputMethod.c:1327
Reviewed-by: serb
author | naoto |
---|---|
date | Wed, 05 Jun 2019 16:10:08 -0700 |
parents | 0d326e0f474c |
children | 184b05daf50f |
files | src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c Wed Jun 05 17:01:43 2019 -0400 +++ b/src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c Wed Jun 05 16:10:08 2019 -0700 @@ -1329,7 +1329,15 @@ /* 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(); }