Commit 0974ffb1 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: missing locks when calling the playlist

parent b2d60da1
......@@ -1005,9 +1005,19 @@ bool PLModel::isSupportedAction( actions action, const QModelIndex &index ) cons
case ACTION_SORT:
return rowCount() && !item->readOnly();
case ACTION_PLAY:
return !isCurrent( index ) || playlist_Status(THEPL) == PLAYLIST_PAUSED;
{
PL_LOCK;
bool b_ret = !isCurrent( index ) || playlist_Status(THEPL) == PLAYLIST_PAUSED;
PL_UNLOCK;
return b_ret;
}
case ACTION_PAUSE:
return isCurrent( index ) && playlist_Status(THEPL) == PLAYLIST_RUNNING;
{
PL_LOCK;
bool b_ret = isCurrent( index ) && playlist_Status(THEPL) == PLAYLIST_RUNNING;
PL_UNLOCK;
return b_ret;
}
case ACTION_STREAM:
case ACTION_SAVE:
case ACTION_INFO:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment