git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [PATCH] line-log: handle deref_tag() returning NULL
@ 2020-10-11 16:03 René Scharfe
  0 siblings, 0 replies; only message in thread
From: René Scharfe @ 2020-10-11 16:03 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 line-log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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?",
--
2.28.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-11 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-11 16:03 [PATCH] line-log: handle deref_tag() returning NULL René Scharfe

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).