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(); } }); }