8366149: JNI exception pending in Java_sun_awt_X11GraphicsDevice_pGetBounds of awt_GraphicsEnv.c:1484

Reviewed-by: aivanov, prr
This commit is contained in:
Damon Nguyen 2025-09-22 20:29:48 +00:00
parent 47efe3c794
commit 9f7b9887cb

View File

@ -1268,11 +1268,15 @@ Java_sun_awt_X11GraphicsDevice_pGetBounds(JNIEnv *env, jobject this, jint screen
xinInfo[screen].width,
xinInfo[screen].height);
XFree(xinInfo);
if (!bounds) {
return NULL;
}
}
} else {
jclass exceptionClass = (*env)->FindClass(env, "java/lang/IllegalArgumentException");
if (exceptionClass != NULL) {
(*env)->ThrowNew(env, exceptionClass, "Illegal screen index");
return NULL;
}
}
}