6891483: XToolkit.getEnv() checks for NULL on a wrong symbol
authoranthony
Mon, 19 Oct 2009 16:06:41 +0400
changeset 4260 913d5ec97629
parent 4259 b41995ac0c17
child 4261 126dc6fe0d7b
6891483: XToolkit.getEnv() checks for NULL on a wrong symbol Reviewed-by: dcherepanov
jdk/src/solaris/native/sun/xawt/XToolkit.c
--- a/jdk/src/solaris/native/sun/xawt/XToolkit.c	Thu Oct 15 16:37:55 2009 -0700
+++ b/jdk/src/solaris/native/sun/xawt/XToolkit.c	Mon Oct 19 16:06:41 2009 +0400
@@ -677,7 +677,7 @@
     jstring ret = NULL;
 
     keystr = JNU_GetStringPlatformChars(env, key, NULL);
-    if (key) {
+    if (keystr) {
         ptr = getenv(keystr);
         if (ptr) {
             ret = JNU_NewStringPlatform(env, (const char *) ptr);