[Mercurial] IDEA-56860 return if project is already disposed
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Tue, 3 Aug 2010 11:56:13 +0000 (15:56 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Tue, 3 Aug 2010 11:56:13 +0000 (15:56 +0400)
plugins/hg4idea/src/org/zmlx/hg4idea/command/HgCommandService.java

index 1313d9dd7b2a0c7f2afc2b65394fd25a96ed953d..f91448a0cedf492844b3f2d099e2da019079eac8 100644 (file)
@@ -83,9 +83,10 @@ public final class HgCommandService {
   }
 
   @Nullable
-  HgCommandResult execute(VirtualFile repo, List<String> hgOptions,
-    String operation, List<String> arguments, Charset charset, boolean suppressCommandOutput) {
-
+  HgCommandResult execute(VirtualFile repo, List<String> hgOptions, String operation, List<String> arguments, Charset charset, boolean suppressCommandOutput) {
+    if (myProject.isDisposed()) {
+      return null;
+    }
     if (!validator.check(mySettings)) {
       return null;
     }