EA-74026 - assert: ComponentManagerImpl.getComponent appcode/144.108 clion/144.106 dbe/144.105 pycharm/144.110 rubymine/144.114 webstorm/144.107
authorSergey Simonchik <sergey.simonchik@jetbrains.com>
Mon, 5 Oct 2015 23:44:14 +0000 (02:44 +0300)
committerSergey Simonchik <sergey.simonchik@jetbrains.com>
Mon, 5 Oct 2015 23:44:14 +0000 (02:44 +0300)
platform/platform-impl/src/com/intellij/util/PsiErrorElementUtil.java

index d78df6a733600be41f40e4942c817bd6dfd4b64f..cfa2025c83953bcf86d09cd7c7c0992f9bf05a91 100644 (file)
@@ -45,6 +45,9 @@ public class PsiErrorElementUtil {
     return ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
       @Override
       public Boolean compute() {
+        if (project.isDisposed()) {
+          return false;
+        }
         PsiManagerEx psiManager = (PsiManagerEx)PsiManager.getInstance(project);
         PsiFile psiFile = psiManager.getFileManager().findFile(virtualFile);
         return psiFile != null && hasErrors(psiFile);