Commit c1986e20 authored by Laurent Aimar's avatar Laurent Aimar

Fixed playlist_IsEmpty usage.

The playlist has to be locked before calling it.
Another way could be to change playlist_IsEmpty prototype to have a b_locked
parameter (like others playlist functions).
parent a4fb6179
...@@ -36,8 +36,14 @@ void CmdPlay::execute() ...@@ -36,8 +36,14 @@ void CmdPlay::execute()
return; return;
} }
if( !playlist_IsEmpty( pPlaylist ) ) vlc_object_lock( pPlaylist );
const bool b_empty = playlist_IsEmpty( pPlaylist );
vlc_object_unlock( pPlaylist );
if( !b_empty )
{
playlist_Play( pPlaylist ); playlist_Play( pPlaylist );
}
else else
{ {
// If the playlist is empty, open a file requester instead // If the playlist is empty, open a file requester instead
......
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