From: Alex Riesen Date: Fri, 12 Oct 2007 20:40:04 +0000 (+0200) Subject: Fix a crash in ls-remote when refspec expands into nothing X-Git-Tag: v1.5.4-rc0~325^2~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8f70a7657a9b459d6a4a3bcb1628c0fa6a6c22e0 Fix a crash in ls-remote when refspec expands into nothing Originally-by: Väinö Järvelä Signed-off-by: Alex Riesen Signed-off-by: Lars Hjemli Signed-off-by: Shawn O. Pearce --- diff --git a/remote.c b/remote.c index e2ca4d32ba..b20e2be433 100644 --- a/remote.c +++ b/remote.c @@ -909,7 +909,8 @@ int get_fetch_map(struct ref *remote_refs, rm->peer_ref->name); } - tail_link_ref(ref_map, tail); + if (ref_map) + tail_link_ref(ref_map, tail); return 0; }