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

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


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

gui/qt: use vlc_playlist_locker in PLModel::isLeaf

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

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

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

diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index a62c8ce..8812bdf 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -408,13 +408,15 @@ bool PLModel::isParent( const QModelIndex &index, const QModelIndex &current ) c
 bool PLModel::isLeaf( const QModelIndex &index ) const
 {
     bool b_isLeaf = false;
-    PL_LOCK;
+
+    vlc_playlist_locker pl_lock ( THEPL );
+
     playlist_item_t *plItem =
         playlist_ItemGetById( p_playlist, itemId( index, PLAYLIST_ID ) );
 
     if( plItem )
         b_isLeaf = plItem->i_children == -1;
-    PL_UNLOCK;
+
     return b_isLeaf;
 }
 



More information about the vlc-commits mailing list