From 716a779cae7bdeddb66fe99e83725384d1dcb182 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 18 Aug 2010 00:02:17 +0200 Subject: Issue a warning instead of testing directory with g_assert. --- commands.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands.c b/commands.c index d4b15f3..a02fd72 100644 --- a/commands.c +++ b/commands.c @@ -34,7 +34,11 @@ static void commands_list(GSocketConnection *connection, const gchar *cmd) { g_strfreev(data); struct directory *directory = music_find_dir(dirname); - g_assert(directory != NULL); + if(directory == NULL) { + g_warning("couldn't find directory %s", dirname); + send_404(connection); + return; + } GString *list_string = g_string_new(NULL); -- cgit v1.2.3