diff options
author | waker <wakeroid@gmail.com> | 2011-05-16 20:23:03 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-05-16 20:23:03 +0200 |
commit | af22ddf012fee8540c81b81a8b4957af6a941c2c (patch) | |
tree | 86c9ca479bd0e4879c4de36f3652e7ce821f0c74 /playlist.c | |
parent | 9f1e7425b79a295da9263ebb1ea1aac7e9052f1e (diff) |
call streamer_notify_playlist_deleted from plt_remove, instead of plt_free
Diffstat (limited to 'playlist.c')
-rw-r--r-- | playlist.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -274,6 +274,7 @@ plt_ref (playlist_t *plt) { void plt_unref (playlist_t *plt) { LOCK; + assert (plt->refc > 0); plt->refc--; if (plt->refc < 0) { trace ("\033[0;31mplaylist: bad refcount on playlist %p (%s)\033[37;0m\n", plt, plt->title); @@ -410,6 +411,7 @@ plt_remove (int plt) { prev = p; p = p->next; } + streamer_notify_playlist_deleted (p); if (!plt_loading) { // move files (will decrease number of files by 1) for (int i = plt+1; i < playlists_count; i++) { @@ -603,7 +605,6 @@ plt_get_modification_idx (playlist_t *plt) { void plt_free (playlist_t *plt) { LOCK; - streamer_notify_playlist_deleted (plt); plt_clear (plt); free (plt->title); |