EA-81101 - assert: FileManagerImpl.findFile appcode/146.1221 clion/146.1222
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 12 Apr 2016 09:01:12 +0000 (12:01 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Tue, 12 Apr 2016 09:01:12 +0000 (12:01 +0300)
platform/platform-impl/src/com/intellij/util/PsiErrorElementUtil.java

index cfa2025c83953bcf86d09cd7c7c0992f9bf05a91..1b5ed7ba7d366e0ac1bc37e35f77cac6f6081337 100644 (file)
@@ -39,13 +39,10 @@ public class PsiErrorElementUtil {
   private PsiErrorElementUtil() {}
 
   public static boolean hasErrors(@NotNull final Project project, @NotNull final VirtualFile virtualFile) {
-    if (project.isDisposed() || !virtualFile.isValid()) {
-      return false;
-    }
     return ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
       @Override
       public Boolean compute() {
-        if (project.isDisposed()) {
+        if (project.isDisposed() || !virtualFile.isValid()) {
           return false;
         }
         PsiManagerEx psiManager = (PsiManagerEx)PsiManager.getInstance(project);