From fe5171d21f7fbbba36585ab796cfd889ee59a242 Mon Sep 17 00:00:00 2001 From: Denis Fokin Date: Tue, 30 Apr 2013 20:14:07 +0400 Subject: [PATCH] ADM-1964 NPE on closing one of two fullscreen projects on macosx --- .../intellij/ui/mac/MacMainFrameDecorator.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ui/mac/MacMainFrameDecorator.java b/platform/platform-impl/src/com/intellij/ui/mac/MacMainFrameDecorator.java index 2e67fe9a9e79..b8727fcd5e1e 100644 --- a/platform/platform-impl/src/com/intellij/ui/mac/MacMainFrameDecorator.java +++ b/platform/platform-impl/src/com/intellij/ui/mac/MacMainFrameDecorator.java @@ -185,18 +185,18 @@ public class MacMainFrameDecorator extends IdeFrameDecorator implements UISettin FullScreenUtilities.addFullScreenListenerTo(frame, new FullScreenAdapter() { @Override public void windowEnteredFullScreen(AppEvent.FullScreenEvent event) { - if (!ORACLE_BUG_ID_8003173) { - enterFullscreen(); - myFrame.validate(); - } + // We can get the notification when the frame has been disposed + if (myFrame == null || ORACLE_BUG_ID_8003173) return; + enterFullscreen(); + myFrame.validate(); } @Override public void windowExitedFullScreen(AppEvent.FullScreenEvent event) { - if (!ORACLE_BUG_ID_8003173) { - exitFullscreen(); - myFrame.validate(); - } + // We can get the notification when the frame has been disposed + if (myFrame == null || ORACLE_BUG_ID_8003173) return; + exitFullscreen(); + myFrame.validate(); } }); }