Skip to content

Commit

Permalink
Fixes crash described by libgit2#689
Browse files Browse the repository at this point in the history
  • Loading branch information
arguiot authored May 16, 2019
1 parent 3668183 commit 8c79a7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ObjectiveGit/GTRepository.m
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ - (BOOL)isEqual:(GTRepository *)repo {
}

- (void)dealloc {
if (_git_repository != NULL) {
if (_git_repository != NULL && _git_repository.workdir != NULL) {
git_repository_free(_git_repository);
_git_repository = NULL;
}
_git_repository = NULL;
}

#pragma mark API
Expand Down

0 comments on commit 8c79a7e

Please sign in to comment.