diff options
author | Martin Koegler <mkoegler@auto.tuwien.ac.at> | 2008-02-18 08:31:55 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-17 23:49:33 -0800 |
commit | 24e8a3c946d158c977b67c346c21abc609c63209 (patch) | |
tree | 7c017f52081e2f6835f7b5661d8be90c8a52d85a | |
parent | affeef12fb2d10317fbcc7a866fbc3603cf16119 (diff) | |
download | git-24e8a3c946d158c977b67c346c21abc609c63209.tar.gz |
deref_tag: handle tag->tagged = NULL
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | tag.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |