]> git.ipfire.org Git - thirdparty/git.git/commitdiff
line-log: handle deref_tag() returning NULL
authorRené Scharfe <l.s.r@web.de>
Sun, 11 Oct 2020 16:03:40 +0000 (18:03 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Oct 2020 19:25:14 +0000 (12:25 -0700)
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
line-log.c

index 68eeb425f8adff845409d2f0f7f64118d97593a2..75c8b1acfff86508614321a83989e2940fc21d4b 100644 (file)
@@ -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?",