From 1101290e39adda5d1e9f5cd6f82abb21de78d1ed Mon Sep 17 00:00:00 2001 From: "Denis.Zhdanov" Date: Mon, 13 May 2013 09:02:28 +0400 Subject: [PATCH] IDEA-104500 Gradle: Allow to reuse common logic for other external systems Don't process orphan external modules when the project is already closed --- .../openapi/externalSystem/util/ExternalSystemUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/util/ExternalSystemUtil.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/util/ExternalSystemUtil.java index d8153dc14205..6a4459315df3 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/util/ExternalSystemUtil.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/util/ExternalSystemUtil.java @@ -199,7 +199,7 @@ public class ExternalSystemUtil { @Override public void onFailure(@NotNull String errorMessage, @Nullable String errorDetails) { - if (--myCounter <= 0) { + if (--myCounter <= 0 && !project.isDisposed()) { processOrphanModules(); } }