aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inotify_update.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/inotify_update.c b/src/inotify_update.c
index 218440110..4939aa557 100644
--- a/src/inotify_update.c
+++ b/src/inotify_update.c
@@ -97,7 +97,13 @@ static void
remove_watch_directory(struct watch_directory *directory)
{
assert(directory != NULL);
- assert(directory->parent != NULL);
+
+ if (directory->parent == NULL) {
+ g_warning("music directory was removed - "
+ "cannot continue to watch it");
+ return;
+ }
+
assert(directory->parent->children != NULL);
tree_remove_watch_directory(directory);