Skip to content

Commit 5eb2ed6

Browse files
rscharfegitster
authored andcommitted
line-log: handle deref_tag() returning NULL
Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent db7d07f commit 5eb2ed6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

line-log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ static struct commit *check_single_commit(struct rev_info *revs)
481481
if (obj->flags & UNINTERESTING)
482482
continue;
483483
obj = deref_tag(revs->repo, obj, NULL, 0);
484-
if (obj->type != OBJ_COMMIT)
484+
if (!obj || obj->type != OBJ_COMMIT)
485485
die("Non commit %s?", revs->pending.objects[i].name);
486486
if (commit)
487487
die("More than one commit to dig from: %s and %s?",

0 commit comments

Comments
 (0)