diff --git a/goffice/app/go-conf-keyfile.c b/goffice/app/go-conf-keyfile.c
index f837a81..c3f75f2 100644
--- a/goffice/app/go-conf-keyfile.c
+++ b/goffice/app/go-conf-keyfile.c
@@ -168,26 +168,30 @@ go_conf_set_str_list (GOConfNode *node, gchar const *key, GSList *list)
 	gchar **strs = NULL;
 	int i, ns;
 
-	if (node == NULL || list == NULL)
+	if (node == NULL)
 		return;
 
 	real_key = go_conf_get_real_key (node, key);
-	ns = g_slist_length (list);
-	strs = g_new (gchar *, ns);
+	if (list != NULL) {
+		ns = g_slist_length (list);
+		strs = g_new (gchar *, ns);
+
+		for (i = 0; i < ns; i++) {
+			const gchar *lstr = list->data;
+			strs[i] = g_strdup (lstr);
+			list = list->next;
+		}
 
-	for (i = 0; i < ns; i++) {
-		const gchar *lstr = list->data;
-		strs[i] = g_strdup (lstr);
-		list = list->next;
-	}
+		g_key_file_set_string_list (node->key_file, STRLIST_GROUP, real_key,
+					    (gchar const **const) strs, ns);
 
-	g_key_file_set_string_list (node->key_file, STRLIST_GROUP, real_key,
-				    (gchar const **const) strs, ns);
+		for (i = 0; i < ns; i++)
+			g_free (strs[i]);
+		g_free (strs);
+	} else
+		g_key_file_set_string_list (node->key_file, STRLIST_GROUP, real_key,
+					    NULL, 0);
 	g_free (real_key);
-
-	for (i = 0; i < ns; i++)
-		g_free (strs[i]);
-	g_free (strs);
 }
 
 gboolean
