Skip to content

Commit 931bd3b

Browse files
authored
Merge pull request libgit2#5617 from muhkuh-sys/master
Fix crash in git_describe_commit when opts are NULL.
2 parents da3288d + d10c846 commit 931bd3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/describe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ int git_describe_commit(
685685
get_name, &data)) < 0)
686686
goto cleanup;
687687

688-
if (git_oidmap_size(data.names) == 0 && !opts->show_commit_oid_as_fallback) {
688+
if (git_oidmap_size(data.names) == 0 && !normalized.show_commit_oid_as_fallback) {
689689
git_error_set(GIT_ERROR_DESCRIBE, "cannot describe - "
690690
"no reference found, cannot describe anything.");
691691
error = -1;

0 commit comments

Comments
 (0)