[vlc-commits] gui/qt: use vlc_playlist_locker in PLModel::activateItem

Filip Roséen git at videolan.org
Wed Jul 20 16:15:56 CEST 2016


vlc | branch: master | Filip Roséen <filip at videolabs.io> | Wed Jul 20 04:37:04 2016 +0200| [19c9fab8d7b4caa3ffb1a8aac12bedc7d6639fa3] | committer: Jean-Baptiste Kempf

gui/qt: use vlc_playlist_locker in PLModel::activateItem

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=19c9fab8d7b4caa3ffb1a8aac12bedc7d6639fa3
---

 modules/gui/qt/components/playlist/playlist_model.cpp |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index 0a081f0..3f03209 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -266,10 +266,11 @@ void PLModel::activateItem( const QModelIndex &index )
     assert( index.isValid() );
     const PLItem *item = getItem( index );
     assert( item );
-    PL_LOCK;
+
+    vlc_playlist_locker pl_lock( THEPL );
+
     playlist_item_t *p_item = playlist_ItemGetById( p_playlist, item->i_playlist_id );
     activateItem( p_item );
-    PL_UNLOCK;
 }
 
 /* Convenient overloaded private version of activateItem



More information about the vlc-commits mailing list