diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-18 00:02:17 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-08-18 00:02:17 +0200 |
commit | 716a779cae7bdeddb66fe99e83725384d1dcb182 (patch) | |
tree | 61432c7020940df713939ee91e9dda27bc3a716f | |
parent | ee2b3ce4b8436a0bb95d83c482884df48f7d0459 (diff) |
Issue a warning instead of testing directory with g_assert.
-rw-r--r-- | commands.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); |