don't search for inheritors of an invalid class (EA-65106 - PIEAE: StubBasedPsiElementBase.getContainingFile)

This commit is contained in:
peter
2015-02-18 19:26:48 +01:00
parent cf2880c5b3
commit fba1bf4c5b
@@ -18,6 +18,7 @@ package com.intellij.psi.search.searches;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.progress.ProgressIndicatorProvider;
import com.intellij.openapi.project.Project;
@@ -170,6 +171,9 @@ public class ClassInheritorsSearch extends ExtensibleQueryFactory<PsiClass, Clas
return search(aClass, ApplicationManager.getApplication().runReadAction(new Computable<SearchScope>() {
@Override
public SearchScope compute() {
if (!aClass.isValid()) {
throw new ProcessCanceledException();
}
return aClass.getUseScope();
}
}), checkDeep);