6963357: After clicking the "Load" button,the case FileDialogUserFilterTest.html crashes in jdk7 b98
Reviewed-by: dcherepanov
This commit is contained in:
parent
25a7d0c26f
commit
e611aef563
@ -191,7 +191,7 @@ Java_sun_awt_X11_GtkFileDialogPeer_run(JNIEnv * env, jobject jpeer,
|
||||
|
||||
fp_gdk_threads_enter();
|
||||
|
||||
const char *title = (*env)->GetStringUTFChars(env, jtitle, 0);
|
||||
const char *title = jtitle == NULL? "": (*env)->GetStringUTFChars(env, jtitle, 0);
|
||||
|
||||
if (mode == 1) {
|
||||
/* Save action */
|
||||
@ -212,7 +212,9 @@ Java_sun_awt_X11_GtkFileDialogPeer_run(JNIEnv * env, jobject jpeer,
|
||||
}
|
||||
}
|
||||
|
||||
(*env)->ReleaseStringUTFChars(env, jtitle, title);
|
||||
if (jtitle != NULL) {
|
||||
(*env)->ReleaseStringUTFChars(env, jtitle, title);
|
||||
}
|
||||
|
||||
/* Set the directory */
|
||||
if (jdir != NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user