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 /shallow.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 'shallow.c')
-rw-r--r-- | shallow.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -56,7 +56,7 @@ struct commit_list *get_shallow_commits(struct object_array *heads, int depth, if (i < heads->nr) { commit = (struct commit *) deref_tag(heads->objects[i++].item, NULL, 0); - if (commit->object.type != OBJ_COMMIT) { + if (!commit || commit->object.type != OBJ_COMMIT) { commit = NULL; continue; } |