summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commands.c6
1 files changed, 5 insertions, 1 deletions
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);