Commit b019a639 authored by Egor.Ushakov's avatar Egor.Ushakov
Browse files

avoid NPE

parent befd6377
Showing with 1 addition and 1 deletion
+1 -1
......@@ -95,7 +95,7 @@ public class DebuggerContextUtil {
Editor editor = ((FileEditorManagerImpl)FileEditorManager.getInstance(file.getProject())).getSelectedTextEditor(true);
//final Editor editor = fileEditor instanceof TextEditorImpl ? ((TextEditorImpl)fileEditor).getEditor() : null;
if (editor != null && position != null && file.getVirtualFile().equals(position.getFile())) {
if (editor != null && position != null && position.getFile().equals(file.getOriginalFile().getVirtualFile())) {
PsiMethod method = PsiTreeUtil.getParentOfType(PositionUtil.getContextElement(context), PsiMethod.class, false);
final Collection<TextRange> ranges =
IdentifierHighlighterPass.getUsages(psi, method != null ? method : file, false);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment