Return empty string as active toolwindow ID if project is disposed (EA-141149 - assert: ComponentManagerImpl.lambda$throwAlreadyDisposed$)

GitOrigin-RevId: ac5e321168d031d425bf15d09f259cb3b11875b9
This commit is contained in:
Dmitry Jemerov
2019-10-11 17:31:19 +00:00
committed by intellij-monorepo-bot
parent d1280b1110
commit 603077e4ee
@@ -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();
}