--- 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];