IDEA-54010 (NPE at git4idea.history.browser.GitProjectLogManager.getCaption)
authorirengrig <Irina.Chernushina@jetbrains.com>
Thu, 15 Apr 2010 19:34:47 +0000 (23:34 +0400)
committerirengrig <Irina.Chernushina@jetbrains.com>
Thu, 15 Apr 2010 19:34:47 +0000 (23:34 +0400)
plugins/git4idea/src/git4idea/history/browser/GitProjectLogManager.java

index 0bffd91075875e9b6b52c999d2fa792aefad0398..d94068ff84abbaa05dd33e919617f3f069511acd 100644 (file)
@@ -32,6 +32,7 @@ import com.intellij.ui.content.ContentFactory;
 import com.intellij.util.CalculateContinuation;
 import com.intellij.util.CatchingConsumer;
 import com.intellij.util.containers.HashMap;
+import git4idea.GitBranch;
 import git4idea.GitBranchesSearcher;
 import git4idea.GitVcs;
 import org.jetbrains.annotations.NotNull;
@@ -148,9 +149,12 @@ public class GitProjectLogManager implements ProjectComponent {
     }
 
     if (searcher != null) {
-      result += " (" + searcher.getLocal().getName() + ")";
+      final GitBranch branch = searcher.getLocal();
+      if (branch != null) {
+        result += " (" + branch.getName() + ")";
+      }
     }
-    return "Log for: " + result;
+    return "Log: " + result;
   }
 
   @NotNull