From 7ddf8d275385aa441fa1f0f9fd9afd36e4fe311d Mon Sep 17 00:00:00 2001 From: Konstantin Aleev Date: Thu, 6 Jul 2017 13:01:07 +0300 Subject: [PATCH] EA-104277 RunDashboard: fix action update when project is disposed --- .../execution/dashboard/RunDashboardContent.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/execution/dashboard/RunDashboardContent.java b/platform/lang-impl/src/com/intellij/execution/dashboard/RunDashboardContent.java index f3bcfb7f7c1a..6d1961ab3c25 100644 --- a/platform/lang-impl/src/com/intellij/execution/dashboard/RunDashboardContent.java +++ b/platform/lang-impl/src/com/intellij/execution/dashboard/RunDashboardContent.java @@ -472,12 +472,18 @@ public class RunDashboardContent extends JPanel implements TreeContent, Disposab @Override public boolean isSelected(AnActionEvent e) { - return RunDashboardManager.getInstance(myProject).isShowConfigurations(); + Project project = e.getProject(); + if (project == null) return true; + + return RunDashboardManager.getInstance(project).isShowConfigurations(); } @Override public void setSelected(AnActionEvent e, boolean state) { - RunDashboardManager.getInstance(myProject).setShowConfigurations(state); + Project project = e.getProject(); + if (project == null) return; + + RunDashboardManager.getInstance(project).setShowConfigurations(state); updateContent(false); } }