From fc95903ea16e68a5b85547be25e21bd36d9aa4bc Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 23 Sep 2008 22:44:16 +0000 Subject: [PATCH] fix leak in Playlist, when close() called if playlist play has not yet begun git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1094 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/AmPlaylist.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/AmPlaylist.cpp b/core/AmPlaylist.cpp index 89c5e7f0..c0a6f55c 100644 --- a/core/AmPlaylist.cpp +++ b/core/AmPlaylist.cpp @@ -145,6 +145,11 @@ void AmPlaylist::addToPlayListFront(AmPlaylistItem* item) void AmPlaylist::close(bool notify) { cur_mut.lock(); + if(!cur_item && !items.empty()){ + cur_item = items.front(); + items.pop_front(); + } + while(cur_item) gotoNextItem(notify); cur_mut.unlock();