changeset 4871:985cd1e770df

Fix a crash when deleting a playlist.
author John Lindgren <john.lindgren@tds.net>
date Sun, 26 Apr 2009 03:35:03 -0400
parents 56af01cd5a5c
children 9501ad351ac0
files src/audlegacy/playlist.c
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/audlegacy/playlist.c	Sat Apr 25 21:32:54 2009 -0400
+++ b/src/audlegacy/playlist.c	Sun Apr 26 03:35:03 2009 -0400
@@ -330,7 +330,7 @@
 
     /* upon removal, a playlist should be cleared and freed */
     playlists = g_list_remove(playlists, playlist);
-    playlist_clear(playlist);
+    playlist_clear_only (playlist);
     playlist_free(playlist);
 
     if (playlists_iter == NULL)
@@ -900,7 +900,7 @@
 }
 
 static gboolean
-devino_destroy(gpointer key, 
+devino_destroy(gpointer key,
                gpointer value,
                gpointer data)
 {
@@ -1015,7 +1015,7 @@
     return playlist_ins(playlist, filename, -1);
 }
 
-guint 
+guint
 playlist_add_dir(Playlist * playlist, const gchar * directory)
 {
     return playlist_ins_dir(playlist, directory, -1, TRUE);
@@ -1502,7 +1502,7 @@
     if ((cfg.no_playlist_advance && !cfg.repeat) || cfg.stopaftersong)
         ip_data.stop = TRUE;
     playback_stop();
-    if ((cfg.no_playlist_advance && !cfg.repeat) || cfg.stopaftersong)  
+    if ((cfg.no_playlist_advance && !cfg.repeat) || cfg.stopaftersong)
         ip_data.stop = FALSE;
 
     hook_call("playback end", playlist->position);
@@ -1933,7 +1933,7 @@
         mtime = 0;
 
     // if no tuple or tuple with old mtime, get new one.
-    if (tuple == NULL || 
+    if (tuple == NULL ||
         (entry->tuple && mtime != 0 && (mtime == -1 || mtime != playlist_get_mtime(entry->filename))))
     {
         playlist_entry_get_info(entry);
@@ -2463,13 +2463,13 @@
                     continue;
                 }
 
-                if (!playlist_entry_get_info(entry) && 
+                if (!playlist_entry_get_info(entry) &&
                     g_list_index(playlist->entries, entry) == -1)
                     /* Entry disappeared while we looked it up.
                        Restart. */
                     node = playlist->entries;
                 else if ((entry->tuple != NULL) ||
-			 (entry->title != NULL && 
+			 (entry->title != NULL &&
                          tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 &&
                          tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1))
                 {
@@ -2586,7 +2586,7 @@
         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);
 
@@ -2642,7 +2642,7 @@
             continue;
 
         /* FIXME: Should test for readability */
-        if (vfs_file_test(entry->filename, G_FILE_TEST_EXISTS))  
+        if (vfs_file_test(entry->filename, G_FILE_TEST_EXISTS))
             continue;
 
         if (entry == playlist->position) {