summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorMartin Koegler <mkoegler@auto.tuwien.ac.at>2008-02-18 07:31:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-02-18 07:46:55 (GMT)
commitaffeef12fb2d10317fbcc7a866fbc3603cf16119 (patch)
tree61ce1a23d8259dc7f90778c7a0fd1b8898a7aa50 /upload-pack.c
parent9886ea417b7da9722c95630b5980ac174e04c71c (diff)
downloadgit-affeef12fb2d10317fbcc7a866fbc3603cf16119.zip
git-affeef12fb2d10317fbcc7a866fbc3603cf16119.tar.gz
git-affeef12fb2d10317fbcc7a866fbc3603cf16119.tar.bz2
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 'upload-pack.c')
-rw-r--r--upload-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 51e3ec4..eaea999 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -575,7 +575,8 @@ static int send_ref(const char *refname, const unsigned char *sha1, int flag, vo
}
if (o->type == OBJ_TAG) {
o = deref_tag(o, refname, 0);
- packet_write(1, "%s %s^{}\n", sha1_to_hex(o->sha1), refname);
+ if (o)
+ packet_write(1, "%s %s^{}\n", sha1_to_hex(o->sha1), refname);
}
return 0;
}