From 0840f9c268caebf82bcd6134a594a4a0b12e22a9 Mon Sep 17 00:00:00 2001 From: "Denis.Zhdanov" Date: Thu, 20 Jun 2013 16:30:41 +0400 Subject: [PATCH] IDEA-104500 Gradle: Allow to reuse common logic for other external systems Correctly handle 'unavailable project' situation --- .../notification/ExternalSystemIdeNotificationManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/notification/ExternalSystemIdeNotificationManager.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/notification/ExternalSystemIdeNotificationManager.java index 1adf63a91840..8242ca70c3f4 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/notification/ExternalSystemIdeNotificationManager.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/notification/ExternalSystemIdeNotificationManager.java @@ -41,7 +41,10 @@ public class ExternalSystemIdeNotificationManager { @NotNull String externalProjectName, @NotNull ProjectSystemId externalSystemId) { - ExternalSystemManager manager = ExternalSystemApiUtil.getManager(externalSystemId); + if (project.isDisposed() || !project.isOpen()) { + return; + } + ExternalSystemManager manager = ExternalSystemApiUtil.getManager(externalSystemId); if (!(manager instanceof ExternalSystemConfigurableAware)) { return; }