From 603077e4eed5a8d8846c4b52bab0539ab685686e Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 11 Oct 2019 18:59:56 +0200 Subject: [PATCH] Return empty string as active toolwindow ID if project is disposed (EA-141149 - assert: ComponentManagerImpl.lambda$throwAlreadyDisposed$) GitOrigin-RevId: ac5e321168d031d425bf15d09f259cb3b11875b9 --- .../src/com/intellij/openapi/wm/ToolWindowManager.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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(); }