[Mercurial] NPE fixed.
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Wed, 7 Jul 2010 10:42:06 +0000 (14:42 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Wed, 7 Jul 2010 10:42:06 +0000 (14:42 +0400)
plugins/hg4idea/src/org/zmlx/hg4idea/command/HgChangesetsCommand.java

index 6fa7b9c3b41881ec3e7967eab1eafd440e020dd1..11d55003a6cc3741a53c1178fc96fc546e909f41 100644 (file)
@@ -55,10 +55,12 @@ public abstract class HgChangesetsCommand {
 
     addArguments(args);
 
-    HgCommandResult result = commandService.execute(
-      repo, Arrays.asList("--quiet"), command, args
-    );
-    
+    HgCommandResult result = commandService.execute(repo, Arrays.asList("--quiet"), command, args);
+
+    if (result == null) {
+      return Collections.emptyList();
+    }
+
     String output = result.getRawOutput();
     if (StringUtils.isEmpty(output)) {
       return Collections.emptyList();