From 971e8e5bccc552fe352129462dbdb8f9db7f89a4 Mon Sep 17 00:00:00 2001 From: Pieter de Bie Date: Mon, 19 Jan 2009 22:20:16 +0000 Subject: [PATCH] PBRefController: Only set title if we have a rev We used to unconditionally set the title of the branch to the current branch. This worked fine in most cases where the current branch was already known, but failed when you use 'gitx -c' and then switch to the HistoryView, because then the currentBranch isn't known yet. The simple fix is to check if we know it. If we don't, it'll be set later on. --- PBRefController.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PBRefController.m b/PBRefController.m index 8dfd092..0e1bfce 100644 --- a/PBRefController.m +++ b/PBRefController.m @@ -296,7 +296,8 @@ - (void) selectCurrentBranch { PBGitRevSpecifier *rev = historyController.repository.currentBranch; - [branchPopUp setTitle:[rev description]]; + if (rev) + [branchPopUp setTitle:[rev description]]; } @end