diff --git a/platform/platform-api/src/com/intellij/openapi/wm/ToolWindowManager.java b/platform/platform-api/src/com/intellij/openapi/wm/ToolWindowManager.java index a5582936a14e..de00aca06a80 100644 --- a/platform/platform-api/src/com/intellij/openapi/wm/ToolWindowManager.java +++ b/platform/platform-api/src/com/intellij/openapi/wm/ToolWindowManager.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.wm; import com.intellij.openapi.Disposable; @@ -156,7 +154,7 @@ public abstract class ToolWindowManager { if (lastFocusedFrame !=null) { Project project = lastFocusedFrame.getProject(); - if (project != null) { + if (project != null && !project.isDisposedOrDisposeInProgress()) { ToolWindowManager instance = getInstance(project); return instance == null ? "" : instance.getActiveToolWindowId(); }