[vlc-commits] gui/qt: use vlc_playlist_locker in PLModel::action
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:37:03 2016 +0200| [92510578e52f691606254aba1faafbce6248da2e] | committer: Jean-Baptiste Kempf
gui/qt: use vlc_playlist_locker in PLModel::action
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=92510578e52f691606254aba1faafbce6248da2e
---
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 );
More information about the vlc-commits
mailing list