aboutsummaryrefslogtreecommitdiffstats
path: root/line-log.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-10-27 15:09:46 -0700
committerJunio C Hamano <gitster@pobox.com>2020-10-27 15:09:46 -0700
commitae84e924dafbaf1eb907065e9fc9c246acb2c265 (patch)
treef1772106851cabdd043098b30250c62a1c712d6d /line-log.c
parent63e52739d272278d89dc9f2a78d1f9887ef28732 (diff)
parent5eb2ed691b809a55b024b8c10739254ea2ac48b7 (diff)
downloadgit-ae84e924dafbaf1eb907065e9fc9c246acb2c265.tar.gz
Merge branch 'rs/tighten-callers-of-deref-tag'
Code clean-up. * rs/tighten-callers-of-deref-tag: line-log: handle deref_tag() returning NULL blame: handle deref_tag() returning NULL grep: handle deref_tag() returning NULL
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 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?",