8285399: JNI exception pending in awt_GraphicsEnv.c:1432

Reviewed-by: azvegint, serb
This commit is contained in:
Phil Race 2022-05-21 16:05:24 +00:00
parent 7c0864752a
commit c156bcc599
2 changed files with 4 additions and 1 deletions

View File

@ -85,6 +85,9 @@ extern void awt_output_flush();
#define AWT_LOCK_IMPL() \
do { \
if ((*env)->ExceptionCheck(env)) { \
(*env)->ExceptionClear(env); \
} \
(*env)->CallStaticVoidMethod(env, tkClass, awtLockMID); \
if ((*env)->ExceptionCheck(env)) { \
(*env)->ExceptionClear(env); \

View File

@ -1425,10 +1425,10 @@ Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals(JNIEnv *env,
AWT_FLUSH_UNLOCK();
for (i = 0; i < visScreenInfo->count; i++) {
XdbeVisualInfo* visInfo = visScreenInfo->visinfo;
(*env)->CallVoidMethod(env, this, midAddVisual, (visInfo[i]).visual);
if ((*env)->ExceptionCheck(env)) {
break;
}
(*env)->CallVoidMethod(env, this, midAddVisual, (visInfo[i]).visual);
}
AWT_LOCK();
XdbeFreeVisualInfo(visScreenInfo);