Skip to content

Commit c897111

Browse files
author
Jan Gassen
committed
Added null check
1 parent dca548e commit c897111

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ObjectiveGit/GTTree.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ - (GTTreeEntry *)entryWithPath:(NSString *)path error:(NSError **)error {
7272
git_tree_entry *entry = NULL;
7373
int gitError = git_tree_entry_bypath(&entry, self.git_tree, path.UTF8String);
7474
if (error != GIT_OK) {
75-
*error = [NSError git_errorFor:gitError description:@"Failed to get tree ntry %@", path];
75+
if (error != NULL) *error = [NSError git_errorFor:gitError description:@"Failed to get tree ntry %@", path];
7676
return nil;
7777
}
7878

0 commit comments

Comments
 (0)