8015425: [macosx] A follow-up for the fix 8010721
authorvkarnauk
Wed, 05 Jun 2013 16:57:33 +0400
changeset 17904 0be4c7d2e53b
parent 17903 643f1ca93dd6
child 17905 650343913d86
8015425: [macosx] A follow-up for the fix 8010721 Reviewed-by: serb, anthony
jdk/src/macosx/native/sun/awt/AWTWindow.m
--- a/jdk/src/macosx/native/sun/awt/AWTWindow.m	Wed Jun 05 14:21:31 2013 +0400
+++ b/jdk/src/macosx/native/sun/awt/AWTWindow.m	Wed Jun 05 16:57:33 2013 +0400
@@ -539,7 +539,7 @@
     AWTWindow *opposite = [AWTWindow lastKeyWindow];
     if (!IS(self.styleBits, IS_DIALOG)) {
         [CMenuBar activate:self.javaMenuBar modallyDisabled:NO];
-    } else if (IS(self.styleBits, IS_MODAL)) {
+    } else if ((opposite != NULL) && IS(self.styleBits, IS_MODAL)) {
         [CMenuBar activate:opposite->javaMenuBar modallyDisabled:YES];        
     }
     [AWTWindow setLastKeyWindow:nil];