[vlc-devel] [PATCH 09/18] gui/qt: use vlc_playlist_locker in PLModel::sort

Filip Roséen filip at videolabs.io
Wed Jul 20 04:36:59 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 29f3f62..fdfec49 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -807,8 +807,9 @@ void PLModel::sort( QModelIndex caller, QModelIndex rootIndex, const int column,
         endRemoveRows( );
     }
 
-    PL_LOCK;
     {
+        vlc_playlist_locker pl_lock ( THEPL );
+
         playlist_item_t *p_root = playlist_ItemGetById( p_playlist,
                                                         i_root_id );
         if( p_root )
@@ -826,7 +827,6 @@ void PLModel::sort( QModelIndex caller, QModelIndex rootIndex, const int column,
         updateChildren( item );
         endInsertRows( );
     }
-    PL_UNLOCK;
 
     /* if we have popup item, try to make sure that you keep that item visible */
     if( p_caller_item )
-- 
2.9.0



More information about the vlc-devel mailing list