summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 08:31:54 +0100
committerJunio C Hamano <gitster@pobox.com>2008-02-17 23:46:55 -0800
commitaffeef12fb2d10317fbcc7a866fbc3603cf16119 (patch)
tree61ce1a23d8259dc7f90778c7a0fd1b8898a7aa50 /shallow.c
parent9886ea417b7da9722c95630b5980ac174e04c71c (diff)
downloadgit-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shallow.c b/shallow.c
index dbd9f5ad0a..212e62b77c 100644
--- a/shallow.c
+++ b/shallow.c
@@ -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;
}