File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ - (void)loadRevisionsWithCompletionBlock:(void (^)(void))completionBlock
7575 GTEnumerator *enu = [[GTEnumerator alloc ] initWithRepository: repo error: &error];
7676
7777 [weakSelf setupEnumerator: enu forRevspec: weakSelf.currentRev];
78- [weakSelf addCommitsFromEnumerator: enu inPBRepo: pbRepo operation: weakParseOperation];
78+ [weakSelf addCommitsFromEnumerator: enu operation: weakParseOperation];
7979 }];
8080 [parseOperation setCompletionBlock: completionBlock];
8181
@@ -193,7 +193,7 @@ - (void)setupEnumerator:(GTEnumerator *)enumerator
193193 }
194194}
195195
196- - (void )addCommitsFromEnumerator : (GTEnumerator *)enumerator inPBRepo : (PBGitRepository *) pbRepo operation : (NSOperation *)operation
196+ - (void )addCommitsFromEnumerator : (GTEnumerator *)enumerator operation : (NSOperation *)operation
197197{
198198 PBGitGrapher *g = [[PBGitGrapher alloc ] init ];
199199 __block NSDate *lastUpdate = [NSDate date ];
@@ -214,6 +214,12 @@ - (void)addCommitsFromEnumerator:(GTEnumerator *)enumerator inPBRepo:(PBGitRepos
214214 return ;
215215 }
216216
217+ PBGitRepository *pbRepo = self.repository ;
218+
219+ if (pbRepo == nil ) {
220+ return ;
221+ }
222+
217223 PBGitCommit *newCommit = nil ;
218224 PBGitCommit *cachedCommit = [self .commitCache objectForKey: oid];
219225 if (cachedCommit) {
You can’t perform that action at this time.
0 commit comments