Avoid EmptyStackException

This commit is contained in:
Vassiliy.Kudryashov
2018-01-19 23:48:33 +03:00
parent 4856c80ce9
commit 4427f66fe7
@@ -885,7 +885,7 @@ public final class ToolWindowManagerImpl extends ToolWindowManagerEx implements
myActiveStack.remove(id, false); // hidden window should be at the top of stack
if (wasActive && moveFocus) {
if (wasActive && moveFocus && !myActiveStack.isEmpty()) {
final String toBeActivatedId = myActiveStack.pop();
if (getInfo(toBeActivatedId).isVisible() || isStackEnabled()) {
activateToolWindowImpl(toBeActivatedId, commandList, false, true);