diff options
author | Martin Koegler <mkoegler@auto.tuwien.ac.at> | 2008-02-18 08:31:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-17 23:46:55 -0800 |
commit | affeef12fb2d10317fbcc7a866fbc3603cf16119 (patch) | |
tree | 61ce1a23d8259dc7f90778c7a0fd1b8898a7aa50 /sha1_name.c | |
parent | 9886ea417b7da9722c95630b5980ac174e04c71c (diff) | |
download | git-affeef12fb2d10317fbcc7a866fbc3603cf16119.tar.gz |
deref_tag: handle return value NULL
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_name.c')
-rw-r--r-- | sha1_name.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sha1_name.c b/sha1_name.c index be8489e4e5..ed3c867d6a 100644 --- a/sha1_name.c +++ b/sha1_name.c @@ -578,8 +578,11 @@ static int handle_one_ref(const char *path, struct object *object = parse_object(sha1); if (!object) return 0; - if (object->type == OBJ_TAG) + if (object->type == OBJ_TAG) { object = deref_tag(object, path, strlen(path)); + if (!object) + return 0; + } if (object->type != OBJ_COMMIT) return 0; insert_by_date((struct commit *)object, list); |