summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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++) {