Skip to contentSkip to conversation

line-log: handle deref_tag() returning NULL

PATCH New René Scharfe 1 participant 1 message Oct 11, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 line-log: handle deref_tag() returning NULL

---
 line-log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
line-log.c +1 -1
index 68eeb425f8..75c8b1acff 100644
@@ -481,7 +481,7 @@ static struct commit *check_single_commit(struct rev_info *revs)
 		if (obj->flags & UNINTERESTING)
 			continue;
 		obj = deref_tag(revs->repo, obj, NULL, 0);
-		if (obj->type != OBJ_COMMIT)
+		if (!obj || obj->type != OBJ_COMMIT)
 			die("Non commit %s?", revs->pending.objects[i].name);
 		if (commit)
 			die("More than one commit to dig from: %s and %s?",

--
2.28.0