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

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


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

gui/qt: use vlc_playlist_locker in PLModel::sort

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

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

 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 )



More information about the vlc-commits mailing list