From: Martin Koegler Date: Mon, 18 Feb 2008 07:31:55 +0000 (+0100) Subject: deref_tag: handle tag->tagged = NULL X-Git-Tag: v1.5.5-rc0~195 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=24e8a3c946d158c977b67c346c21abc609c63209;p=git.git deref_tag: handle tag->tagged = NULL Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- diff --git a/tag.c b/tag.c index 38bf9134f..990134fe7 100644 --- a/tag.c +++ b/tag.c @@ -9,7 +9,10 @@ const char *tag_type = "tag"; struct object *deref_tag(struct object *o, const char *warn, int warnlen) { while (o && o->type == OBJ_TAG) - o = parse_object(((struct tag *)o)->tagged->sha1); + if (((struct tag *)o)->tagged) + o = parse_object(((struct tag *)o)->tagged->sha1); + else + o = NULL; if (!o && warn) { if (!warnlen) warnlen = strlen(warn);