X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=tag.c;h=4470d2bf78e1fbb00d00e487f41daa4373cf48e1;hb=6304c29d518206b0780291a02f94f435abf82d74;hp=d19f56d60cb166600f9fe906a213f20a04afe22e;hpb=7914053ba9901be1f1530f46e8e2e6ee6f4ae5b1;p=git.git diff --git a/tag.c b/tag.c index d19f56d60..4470d2bf7 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);