OpenJDK / amber / amber
changeset 7774:279c38a42ae5
6963357: After clicking the "Load" button,the case FileDialogUserFilterTest.html crashes in jdk7 b98.
Reviewed-by: dcherepanov
author | dav |
---|---|
date | Wed, 29 Dec 2010 17:36:31 +0300 |
parents | d714591bc2f0 |
children | c75bf08f7e0c |
files | jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c Wed Dec 29 15:13:00 2010 +0300 +++ b/jdk/src/solaris/native/sun/awt/sun_awt_X11_GtkFileDialogPeer.c Wed Dec 29 17:36:31 2010 +0300 @@ -191,7 +191,7 @@ 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 @@ } } - (*env)->ReleaseStringUTFChars(env, jtitle, title); + if (jtitle != NULL) { + (*env)->ReleaseStringUTFChars(env, jtitle, title); + } /* Set the directory */ if (jdir != NULL) {