[vlc-devel] [PATCH 11/18] gui/qt: use vlc_playlist_locker in PLModel::createNode

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


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

diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index f81328f..7fd669f 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -888,13 +888,13 @@ void PLModel::createNode( QModelIndex index, QString name )
 {
     if( name.isEmpty() || !index.isValid() ) return;
 
-    PL_LOCK;
+    vlc_playlist_locker pl_lock ( THEPL );
+
     index = index.parent();
     if ( !index.isValid() ) index = rootIndex();
     playlist_item_t *p_item = playlist_ItemGetById( p_playlist, itemId( index, PLAYLIST_ID ) );
     if( p_item )
         playlist_NodeCreate( p_playlist, qtu( name ), p_item, PLAYLIST_END, 0, NULL );
-    PL_UNLOCK;
 }
 
 void PLModel::renameNode( QModelIndex index, QString name )
-- 
2.9.0



More information about the vlc-devel mailing list