From a86de08a82537f71475dac6434021db95dbca74a Mon Sep 17 00:00:00 2001 From: "Denis.Zhdanov" Date: Fri, 22 Feb 2013 14:32:17 +0400 Subject: [PATCH] IDEA-96177 Gradle: Throwable at GradleShowConflictDetailsAction$1.onClosed() on closing a project when conflicts popup is shown --- .../gradle/action/GradleShowConflictDetailsAction.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/gradle/src/org/jetbrains/plugins/gradle/action/GradleShowConflictDetailsAction.java b/plugins/gradle/src/org/jetbrains/plugins/gradle/action/GradleShowConflictDetailsAction.java index 0a61d888ed65..7a341fa94f77 100644 --- a/plugins/gradle/src/org/jetbrains/plugins/gradle/action/GradleShowConflictDetailsAction.java +++ b/plugins/gradle/src/org/jetbrains/plugins/gradle/action/GradleShowConflictDetailsAction.java @@ -52,7 +52,7 @@ public class GradleShowConflictDetailsAction extends AbstractGradleSyncTreeNodeA } @Override - protected void doActionPerformed(@NotNull Collection> nodes, @NotNull Project project, @NotNull Tree tree) { + protected void doActionPerformed(@NotNull Collection> nodes, @NotNull final Project project, @NotNull Tree tree) { assert nodes.size() == 1; final GradleProjectStructureNode node = nodes.iterator().next(); final GradleProjectStructureContext context = ServiceManager.getService(project, GradleProjectStructureContext.class); @@ -80,7 +80,9 @@ public class GradleShowConflictDetailsAction extends AbstractGradleSyncTreeNodeA balloon.addListener(new JBPopupAdapter() { @Override public void onClosed(LightweightWindowEvent event) { - publisher.afterConflictUiShown(); + if (!project.isDisposed()) { + publisher.afterConflictUiShown(); + } } }); balloon.show(new RelativePoint(tree, hintPosition), Balloon.Position.below);