X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=tag.c;h=990134fe7ab14043d40b97230571ffea109b9129;hb=c149184;hp=38bf9134f97c18973fe189c8703438f5e1135e49;hpb=e708af6e587ae0ecb2a6480e3614c5ec4a164106;p=git.git 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);