summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-09-03 21:24:09 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-09-03 21:24:09 +0200
commitfd880c0afd2a369738d697bf621d35e473c3ea70 (patch)
tree78103c4603d68f97859033c6fd5dc0740b75a15a
parent476c8bf220d4cc2a68e9a1bba823c78d84f507f7 (diff)
Set error in list_remote() when failing to retrieve list.
-rw-r--r--commands.c5
1 files changed, 5 insertions, 0 deletions
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++) {