Skip to content

Commit

Permalink
Only update selectedCommit in [PBGitHistoryController updateKeys] whe…
Browse files Browse the repository at this point in the history
…n not nil.
  • Loading branch information
andreberg committed Apr 5, 2010
1 parent f704c99 commit 1d4e4c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PBGitHistoryController.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ - (void)awakeFromNib

- (void) updateKeys
{
selectedCommit = [[commitController selectedObjects] lastObject];
PBGitCommit * lastObject = [[commitController selectedObjects] lastObject];
if (lastObject) {
selectedCommit = lastObject;
}

if (self.selectedCommitDetailsIndex == kHistoryTreeViewIndex) {
self.gitTree = selectedCommit.tree;
Expand Down

0 comments on commit 1d4e4c5

Please sign in to comment.