summaryrefslogtreecommitdiff
path: root/line-log.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2020-10-11 16:03:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-12 19:25:14 (GMT)
commit5eb2ed691b809a55b024b8c10739254ea2ac48b7 (patch)
tree8197d02941d5b84f6d8e7ebb011a253cfb55bead /line-log.c
parentdb7d07f61057e94e2a3683ca10d67a2a219f542f (diff)
downloadgit-5eb2ed691b809a55b024b8c10739254ea2ac48b7.zip
git-5eb2ed691b809a55b024b8c10739254ea2ac48b7.tar.gz
git-5eb2ed691b809a55b024b8c10739254ea2ac48b7.tar.bz2
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>
Diffstat (limited to 'line-log.c')
-rw-r--r--line-log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/line-log.c b/line-log.c
index 68eeb42..75c8b1a 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?",