Author: sayer
Date: 2008-09-24 00:44:16 +0200 (Wed, 24 Sep 2008)
New Revision: 1094

Modified:
   trunk/core/AmPlaylist.cpp
Log:
fix leak in Playlist, when close() called if playlist play has not yet begun



Modified: trunk/core/AmPlaylist.cpp
===================================================================
--- trunk/core/AmPlaylist.cpp   2008-09-23 22:39:57 UTC (rev 1093)
+++ trunk/core/AmPlaylist.cpp   2008-09-23 22:44:16 UTC (rev 1094)
@@ -145,6 +145,11 @@
 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();

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to