Commit 931bd3b83d624ec890a537ba4c1357ebf8032dca

Edward Thomson 2020-08-28T12:30:35

Merge pull request #5617 from muhkuh-sys/master Fix crash in git_describe_commit when opts are NULL.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/describe.c b/src/describe.c
index c8a1752..8beffde 100644
--- a/src/describe.c
+++ b/src/describe.c
@@ -685,7 +685,7 @@ int git_describe_commit(
 			get_name, &data)) < 0)
 				goto cleanup;
 
-	if (git_oidmap_size(data.names) == 0 && !opts->show_commit_oid_as_fallback) {
+	if (git_oidmap_size(data.names) == 0 && !normalized.show_commit_oid_as_fallback) {
 		git_error_set(GIT_ERROR_DESCRIBE, "cannot describe - "
 			"no reference found, cannot describe anything.");
 		error = -1;