diff --git a/PBGitGrapher.m b/PBGitGrapher.m index 08324eb..a264f3b 100644 --- a/PBGitGrapher.m +++ b/PBGitGrapher.m @@ -126,7 +126,11 @@ previous.numColumns = [currentLanes count] - 1; else previous.numColumns = [currentLanes count]; - currentLane.sha = [commit.parents objectAtIndex:0]; + + if ([commit.parents count] > 0 && ![[commit.parents objectAtIndex:0] isEqualToString:@""]) + currentLane.sha = [commit.parents objectAtIndex:0]; + else + [currentLanes removeObject:currentLane]; previousLanes = currentLanes; [cellsInfo addObject: previous];