diff --git a/platform/platform-impl/src/com/intellij/ui/mac/MergeAllWindowsAction.java b/platform/platform-impl/src/com/intellij/ui/mac/MergeAllWindowsAction.java index 367da6beeaf3..c5b08d70bc7a 100644 --- a/platform/platform-impl/src/com/intellij/ui/mac/MergeAllWindowsAction.java +++ b/platform/platform-impl/src/com/intellij/ui/mac/MergeAllWindowsAction.java @@ -62,6 +62,10 @@ public class MergeAllWindowsAction extends DumbAwareAction { public void appStarted() { if (JdkEx.isTabbingModeAvailable()) { IdeFrame[] frames = WindowManager.getInstance().getAllProjectFrames(); + if (frames.length == 0) { + return; + } + if (frames.length > 1) { for (IdeFrame frame : frames) { if (!frame.isInFullScreen()) {