changeset 4525:16466c2624b2

Check if the playlist scanning thread has already been stopped, so that we don't crash in thread joining.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 30 Apr 2008 04:35:59 +0300
parents a5377b724505
children 8465e73d5584
files src/audacious/playlist.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playlist.c	Wed Apr 30 03:49:46 2008 +0300
+++ b/src/audacious/playlist.c	Wed Apr 30 04:35:59 2008 +0300
@@ -2532,6 +2532,11 @@
 playlist_stop_get_info_thread(void)
 {
     g_static_rw_lock_writer_lock(&playlist_get_info_rwlock);
+    if (!playlist_get_info_going) {
+        g_static_rw_lock_writer_unlock(&playlist_get_info_rwlock);
+        return;
+    }
+    
     playlist_get_info_going = FALSE;
     g_static_rw_lock_writer_unlock(&playlist_get_info_rwlock);