changeset 3951:4eeff1fda9ea

6983562: Two java/awt tests failing just on jdk7b108 Reviewed-by: art, denis, dcherepanov
author serb
date Fri, 15 Apr 2011 16:51:25 +0400
parents 6228934e36bc
children 346b56971f18
files src/windows/native/sun/windows/awt_Button.cpp src/windows/native/sun/windows/awt_Checkbox.cpp
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/sun/windows/awt_Button.cpp	Thu Apr 14 16:16:19 2011 +0400
+++ b/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/src/windows/native/sun/windows/awt_Checkbox.cpp	Thu Apr 14 16:16:19 2011 +0400
+++ b/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);
+            }
         }
     }