6983562: Two java/awt tests failing just on jdk7b108
authorserb
Fri, 15 Apr 2011 16:51:25 +0400
changeset 9209 702583008e36
parent 9208 ea5026682a93
child 9210 f973306e1d07
6983562: Two java/awt tests failing just on jdk7b108 Reviewed-by: art, denis, dcherepanov
jdk/src/windows/native/sun/windows/awt_Button.cpp
jdk/src/windows/native/sun/windows/awt_Checkbox.cpp
--- a/jdk/src/windows/native/sun/windows/awt_Button.cpp	Thu Apr 14 16:16:19 2011 +0400
+++ b/jdk/src/windows/native/sun/windows/awt_Button.cpp	Fri Apr 15 16:51:25 2011 +0400
@@ -317,7 +317,9 @@
             badAlloc = 1;
         } else {
             c->SetText(labelStr);
-            JNU_ReleaseStringPlatformChars(env, label, labelStr);
+            if (label != NULL) {
+                JNU_ReleaseStringPlatformChars(env, label, labelStr);
+            }
         }
     }
 
--- a/jdk/src/windows/native/sun/windows/awt_Checkbox.cpp	Thu Apr 14 16:16:19 2011 +0400
+++ b/jdk/src/windows/native/sun/windows/awt_Checkbox.cpp	Fri Apr 15 16:51:25 2011 +0400
@@ -384,7 +384,9 @@
         {
             c->SetText(labelStr);
             c->VerifyState();
-            JNU_ReleaseStringPlatformChars(env, label, labelStr);
+            if (label != NULL) {
+                JNU_ReleaseStringPlatformChars(env, label, labelStr);
+            }
         }
     }