From affeef12fb2d10317fbcc7a866fbc3603cf16119 Mon Sep 17 00:00:00 2001 From: Martin Koegler Date: Mon, 18 Feb 2008 08:31:54 +0100 Subject: deref_tag: handle return value NULL Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- builtin-show-ref.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'builtin-show-ref.c') diff --git a/builtin-show-ref.c b/builtin-show-ref.c index 65051d14f..a323633e2 100644 --- a/builtin-show-ref.c +++ b/builtin-show-ref.c @@ -86,6 +86,9 @@ match: sha1_to_hex(sha1)); if (obj->type == OBJ_TAG) { obj = deref_tag(obj, refname, 0); + if (!obj) + die("git-show-ref: bad tag at ref %s (%s)", refname, + sha1_to_hex(sha1)); hex = find_unique_abbrev(obj->sha1, abbrev); printf("%s %s^{}\n", hex, refname); } -- cgit v1.2.1