Skip to content

Commit

Permalink
Merge pull request #462 from dleehr/fix-tag-enumeration-crash
Browse files Browse the repository at this point in the history
Avoid calling tag enumerator block if lookup returns nil tag
  • Loading branch information
joshaber committed Jun 2, 2015
2 parents ac7be76 + 4f29c2b commit 5373acf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ObjectiveGit/GTRepository.m
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,9 @@ static int GTRepositoryForeachTagCallback(const char *name, git_oid *oid, void *
GTTag *tag = (GTTag *)[info->myself lookUpObjectByGitOid:oid objectType:GTObjectTypeTag error:NULL];

BOOL stop = NO;
info->block(tag, &stop);
if (tag != nil) {
info->block(tag, &stop);
}

return stop ? GIT_EUSER : 0;
}
Expand Down

0 comments on commit 5373acf

Please sign in to comment.