EA-30476 NPE
authorKirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
Sat, 11 Aug 2012 10:28:01 +0000 (14:28 +0400)
committerKirill Likhodedov <Kirill.Likhodedov@jetbrains.com>
Sat, 11 Aug 2012 10:28:01 +0000 (14:28 +0400)
plugins/git4idea/src/git4idea/history/GitLogParser.java

index a39f5245a83edbe4d9f48a50f2d6c0e4f31ff41f..e274e1ec5e439d6dfa0b55874cf631d7a2247ac3 100644 (file)
@@ -115,7 +115,7 @@ class GitLogParser {
     RAW_BODY("B");
 
     private String myPlaceholder;
-    private GitLogOption(String placeholder) { myPlaceholder = placeholder; }
+    GitLogOption(String placeholder) { myPlaceholder = placeholder; }
     private String getPlaceholder() { return myPlaceholder; }
   }
 
@@ -134,7 +134,8 @@ class GitLogParser {
     myFormat = makeFormatFromOptions(options);
     myOptions = options;
     myNameStatusOption = nameStatusOption;
-    mySupportsRawBody = GitVersionSpecialty.STARTED_USING_RAW_BODY_IN_FORMAT.existsIn(GitVcs.getInstance(project).getVersion());
+    GitVcs vcs = GitVcs.getInstance(project);
+    mySupportsRawBody = vcs != null && GitVersionSpecialty.STARTED_USING_RAW_BODY_IN_FORMAT.existsIn(vcs.getVersion());
   }
 
   private static String makeFormatFromOptions(GitLogOption[] options) {