From affeef12fb2d10317fbcc7a866fbc3603cf16119 Mon Sep 17 00:00:00 2001 From: Martin Koegler Date: Mon, 18 Feb 2008 08:31:54 +0100 Subject: deref_tag: handle return value NULL Signed-off-by: Martin Koegler Signed-off-by: Junio C Hamano --- upload-pack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'upload-pack.c') 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; } -- cgit v1.2.1