Qt4: add mutex-lockin when accessing selector-names
authorIlkka Ollakka <ileoo@videolan.org>
Thu, 13 Aug 2009 13:10:12 +0000 (16:10 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Thu, 13 Aug 2009 13:10:12 +0000 (16:10 +0300)
modules/gui/qt4/components/playlist/playlist_model.cpp

index c6fc9a4..d60c078 100644 (file)
@@ -322,7 +322,12 @@ QVariant PLModel::data( const QModelIndex &index, int role ) const
         int metadata = 1;
 
         if( item->model->i_depth == DEPTH_SEL )
-            return QVariant( QString( qfu( item->p_input->psz_name ) ) );
+        {
+            vlc_mutex_lock( &item->p_input->lock );
+            QString returninfo = QString( qfu( item->p_input->psz_name ) );
+            vlc_mutex_unlock( &item->p_input->lock );
+            return QVariant(returninfo);
+        }
 
         while( metadata < COLUMN_END )
         {