From 3528c0cdbd1057f2ed02385d44920dbfc6327c6d Mon Sep 17 00:00:00 2001 From: anna Date: Fri, 9 Sep 2011 13:01:27 +0200 Subject: [PATCH] EA-29530 - NPE: ShowImplementationsAction$ImplementationsUpdaterTask. --- .../codeInsight/hint/actions/ShowImplementationsAction.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java b/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java index 31a75cccd1d2..0231c38aa140 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java @@ -47,6 +47,7 @@ import com.intellij.ui.popup.PopupPositionManager; import com.intellij.ui.popup.PopupUpdateProcessor; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.lang.ref.WeakReference; import java.util.*; @@ -232,7 +233,7 @@ public class ShowImplementationsAction extends AnAction implements PopupAction { } private void updateInBackground(Editor editor, - PsiElement element, + @Nullable PsiElement element, ImplementationViewComponent component, String title, AbstractPopup popup) { @@ -243,6 +244,7 @@ public class ShowImplementationsAction extends AnAction implements PopupAction { } } + if (element == null) return; //already found final ImplementationsUpdaterTask task = new ImplementationsUpdaterTask(element, editor, title); task.init(popup, component);