[vlc-devel] [PATCH 06/18] gui/qt: use vlc_playlist_locker in PLModel::isLeaf

Filip Roséen filip at videolabs.io
Wed Jul 20 04:36:56 CEST 2016


---
 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;
 }
 
-- 
2.9.0



More information about the vlc-devel mailing list