Skip to content

Commit 9f7b988

Browse files
author
Damon Nguyen
committed
8366149: JNI exception pending in Java_sun_awt_X11GraphicsDevice_pGetBounds of awt_GraphicsEnv.c:1484
Reviewed-by: aivanov, prr
1 parent 47efe3c commit 9f7b988

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,11 +1268,15 @@ Java_sun_awt_X11GraphicsDevice_pGetBounds(JNIEnv *env, jobject this, jint screen
12681268
xinInfo[screen].width,
12691269
xinInfo[screen].height);
12701270
XFree(xinInfo);
1271+
if (!bounds) {
1272+
return NULL;
1273+
}
12711274
}
12721275
} else {
12731276
jclass exceptionClass = (*env)->FindClass(env, "java/lang/IllegalArgumentException");
12741277
if (exceptionClass != NULL) {
12751278
(*env)->ThrowNew(env, exceptionClass, "Illegal screen index");
1279+
return NULL;
12761280
}
12771281
}
12781282
}

0 commit comments

Comments
 (0)