Find Usages: Fix NPE

#EA-64275 Fixed
This commit is contained in:
Alexey Sedunov
2015-05-28 18:18:46 +03:00
parent e1f660f446
commit fed8047a59
@@ -61,6 +61,7 @@ public abstract class KotlinFindUsagesHandler<T extends PsiElement> extends Find
}
protected static boolean processUsage(Processor<UsageInfo> processor, PsiReference ref) {
if (ref == null) return true;
TextRange rangeInElement = ref.getRangeInElement();
return processor.process(new UsageInfo(ref.getElement(), rangeInElement.getStartOffset(), rangeInElement.getEndOffset(), false));
}