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 /upload-pack.c | |
parent | 9886ea417b7da9722c95630b5980ac174e04c71c (diff) | |
download | git-affeef12fb2d10317fbcc7a866fbc3603cf16119.tar.gz git-affeef12fb2d10317fbcc7a866fbc3603cf16119.tar.xz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c index 51e3ec49d..eaea9990e 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; } |