[vlc-commits] Qt: missing lock in infos panel update

Francois Cartegnie git at videolan.org
Thu Dec 22 11:44:37 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 22 11:39:45 2016 +0100| [808bf7cb142f4101c63de16e9a3343b9edfbb200] | committer: Francois Cartegnie

Qt: missing lock in infos panel update

crashes on heavy/frequent updates

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

 modules/gui/qt/components/info_panels.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/gui/qt/components/info_panels.cpp b/modules/gui/qt/components/info_panels.cpp
index 45f6b35..ed7d4a6 100644
--- a/modules/gui/qt/components/info_panels.cpp
+++ b/modules/gui/qt/components/info_panels.cpp
@@ -497,6 +497,7 @@ void InfoPanel::update( input_item_t *p_item)
     QTreeWidgetItem *current_item = NULL;
     QTreeWidgetItem *child_item = NULL;
 
+    vlc_mutex_lock( &p_item->lock );
     for( int i = 0; i< p_item->i_categories ; i++)
     {
         current_item = new QTreeWidgetItem();
@@ -515,6 +516,7 @@ void InfoPanel::update( input_item_t *p_item)
         }
         InfoTree->setItemExpanded( current_item, true);
     }
+    vlc_mutex_unlock( &p_item->lock );
 }
 
 /**



More information about the vlc-commits mailing list