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>
This commit is contained in:

committed by
Junio C Hamano

parent
9886ea417b
commit
affeef12fb
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user