line-log: handle deref_tag() returning NULL

Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Oct 11, 2020 at 18:03 UTC 5eb2ed691b809a55b024b8c10739254ea2ac48b7
1 file changed +1 -1
line-log.c
+1 -1
@@ -481,7 +481,7 @@ static struct commit *check_single_commit(struct rev_info *revs)
481 if (obj->flags & UNINTERESTING)
482 continue;
483 obj = deref_tag(revs->repo, obj, NULL, 0);
484 - if (obj->type != OBJ_COMMIT)
484 + if (!obj || obj->type != OBJ_COMMIT)
485 die("Non commit %s?", revs->pending.objects[i].name);
486 if (commit)
487 die("More than one commit to dig from: %s and %s?",