From b05ba7026f5fb70879532fb91c23dd31af164081 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Thu, 5 May 2016 14:43:06 +0300 Subject: [PATCH] inspection tool window: check validity for before requesting a custom presentation --- .../com/intellij/codeInspection/ui/InspectionResultsView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java index 8a1b1dd38221..2096cfecf274 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java @@ -471,7 +471,7 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren final int problemCount = myTree.getSelectedProblemCount(); JComponent previewPanel = null; final InspectionToolWrapper tool = myTree.getSelectedToolWrapper(); - if (tool != null && refEntity != null && problemCount == 1) { + if (tool != null && refEntity != null && problemCount == 1 && refEntity.isValid()) { final InspectionToolPresentation presentation = myGlobalInspectionContext.getPresentation(tool); previewPanel = presentation.getCustomPreviewPanel(refEntity); }