6983562: Two java/awt tests failing just on jdk7b108
Reviewed-by: art, denis, dcherepanov
--- 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);
+ }
}
}