[vlc-devel] [PATCH 15/18] gui/qt: use vlc_playlist_locker in MessagesDialog::updatePLTree

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


---
 modules/gui/qt/dialogs/messages.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/dialogs/messages.cpp b/modules/gui/qt/dialogs/messages.cpp
index ddf9f75..59f5607 100644
--- a/modules/gui/qt/dialogs/messages.cpp
+++ b/modules/gui/qt/dialogs/messages.cpp
@@ -375,9 +375,12 @@ void MessagesDialog::updatePLTree()
 {
     playlist_t *p_playlist = THEPL;
     pldebugTree->clear();
-    PL_LOCK;
-    pldebugTree->addTopLevelItem( PLWalk( p_playlist->p_root_category ) );
-    PL_UNLOCK;
+
+    {
+        vlc_playlist_locker pl_lock ( THEPL );
+        pldebugTree->addTopLevelItem( PLWalk( p_playlist->p_root_category ) );
+    }
+
     pldebugTree->expandAll();
     for ( int i=0; i< 5; i++ )
         pldebugTree->resizeColumnToContents( i );
-- 
2.9.0



More information about the vlc-devel mailing list