diff --git a/line-log.c b/line-log.c index 68eeb425f8a..75c8b1acfff 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?",