TreeUi: NPE on bg loading when released
authorKirill Kalishev <kirill.kalishev@jetbrains.com>
Mon, 26 Apr 2010 08:04:08 +0000 (12:04 +0400)
committerKirill Kalishev <kirill.kalishev@jetbrains.com>
Mon, 26 Apr 2010 08:04:08 +0000 (12:04 +0400)
platform/platform-api/src/com/intellij/ide/util/treeView/AbstractTreeUi.java

index 1504e30444415f4cff09ee6697304ecc125bac56..f8af228c6ea96f1a07703bc2daa07bc4e529d83e 100644 (file)
@@ -2588,6 +2588,7 @@ public class AbstractTreeUi {
         builder.runBackgroundLoading(new Runnable() {
           public void run() {
             assertNotDispatchThread();
+            if (isReleased()) return;
 
             try {
               bgBuildAction.run();
@@ -2597,6 +2598,7 @@ public class AbstractTreeUi {
                   public void run() {
                     try {
                       assertIsDispatchThread();
+                      if (isReleased()) return;
 
                       edtPostRunnable.run();
                     } catch (ProcessCanceledException e) {