[vlc-devel] [PATCH 13/18] gui/qt: use vlc_playlist_locker in PLModel::action
Filip Roséen
filip at videolabs.io
Wed Jul 20 04:37:03 CEST 2016
---
modules/gui/qt/components/playlist/playlist_model.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index 0366ac2..0a081f0 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -938,7 +938,9 @@ bool PLModel::action( QAction *action, const QModelIndexList &indexes )
break;
case ACTION_ADDTOPLAYLIST:
- PL_LOCK;
+ {
+ vlc_playlist_locker pl_lock ( THEPL );
+
foreach( const QModelIndex ¤tIndex, indexes )
{
playlist_item_t *p_item = playlist_ItemGetById( THEPL, itemId( currentIndex, PLAYLIST_ID ) );
@@ -948,8 +950,8 @@ bool PLModel::action( QAction *action, const QModelIndexList &indexes )
THEPL->p_playing,
PLAYLIST_END );
}
- PL_UNLOCK;
return true;
+ }
case ACTION_REMOVE:
doDelete( indexes );
--
2.9.0
More information about the vlc-devel
mailing list