diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java index 2b28d9854451..3e1b2c271210 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ShowIntentionsPass.java @@ -170,8 +170,8 @@ public class ShowIntentionsPass extends TextEditorHighlightingPass { injectedFile = InjectedLanguageUtil.findInjectedPsiNoCommit(file, offset); injectedEditor = InjectedLanguageUtil.getInjectedEditorForInjectedFile(editor, injectedFile); } - editorToUse = injectedEditor; - fileToUse = injectedFile; + editorToUse = injectedFile == null ? editor : injectedEditor; + fileToUse = injectedFile == null ? file : injectedFile; } else { editorToUse = editor;