From 8f70a7657a9b459d6a4a3bcb1628c0fa6a6c22e0 Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Fri, 12 Oct 2007 22:40:04 +0200 Subject: [PATCH] Fix a crash in ls-remote when refspec expands into nothing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Originally-by: Väinö Järvelä Signed-off-by: Alex Riesen Signed-off-by: Lars Hjemli Signed-off-by: Shawn O. Pearce --- remote.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remote.c b/remote.c index e2ca4d32b..b20e2be43 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; } -- 2.30.2