From: René Scharfe Date: Sun, 11 Oct 2020 16:03:40 +0000 (+0200) Subject: line-log: handle deref_tag() returning NULL X-Git-Tag: v2.30.0-rc0~156^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5eb2ed691b809a55b024b8c10739254ea2ac48b7;p=thirdparty%2Fgit.git line-log: handle deref_tag() returning NULL Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- diff --git a/line-log.c b/line-log.c index 68eeb425f8..75c8b1acff 100644 --- a/line-log.c +++ b/line-log.c @@ -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?",