[Mercurial] NPE fix: result is abort if it is null. EA-21307
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Fri, 30 Jul 2010 11:36:38 +0000 (15:36 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Fri, 30 Jul 2010 11:36:38 +0000 (15:36 +0400)
plugins/hg4idea/src/org/zmlx/hg4idea/command/HgErrorUtil.java

index 1be7ac42bcdab1386e4a6cc468431917737a9501..dca18dda0910e1aa731cdecb96969e88d91b735c 100644 (file)
@@ -21,6 +21,9 @@ public final class HgErrorUtil {
   private HgErrorUtil() { }
 
   public static boolean isAbort(HgCommandResult result) {
+    if (result == null) {
+      return true;
+    }
     String line = getLastErrorLine(result);
     return StringUtils.isNotBlank(line) && StringUtils.contains(line, "abort:");
   }