From fd880c0afd2a369738d697bf621d35e473c3ea70 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 3 Sep 2010 21:24:09 +0200 Subject: Set error in list_remote() when failing to retrieve list. --- commands.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands.c b/commands.c index 21b482a..c01fb8c 100644 --- a/commands.c +++ b/commands.c @@ -47,6 +47,11 @@ static void list_remote(GString *string, gchar *remotehost, gchar *dirname, GErr } gchar **data = server_list(server, dirname); + if(data == NULL) { + *error = g_error_new(commands_quark(), 0, "couldn't retrieve list"); + return; + } + g_debug("got %d results from %s", g_strv_length(data), remotehost); for(gint i = 0; i < g_strv_length(data); i++) { -- cgit v1.2.3