diff -ur mythmusic.orig/mythmusic/databasebox.cpp mythmusic/mythmusic/databasebox.cpp
--- mythmusic.orig/mythmusic/databasebox.cpp	2006-02-16 08:13:21.000000000 +0100
+++ mythmusic/mythmusic/databasebox.cpp	2006-10-20 00:32:07.000000000 +0200
@@ -143,6 +143,10 @@
         delete cd_reader_thread;
     }
 
+    // Make sure the loading threads are done before trying to clean up
+    while (!all_music->doneLoading() || !the_playlists->doneLoading())
+        sleep(1);
+
     all_music->resetListings();
     
     the_playlists->getActive()->removeAllWidgets();
