Update issue 3962: don't try to activate a playlist which doesn't exist/isn't opened anymore (otherwise we crash on Q_ASSERT)

This commit is contained in:
Arnaud Bienner 2013-11-16 19:52:14 +01:00
parent 36a263975e
commit 51d9080a81
1 changed files with 4 additions and 0 deletions

View File

@ -543,6 +543,10 @@ void Mpris2::ActivatePlaylist(const QDBusObjectPath& playlist_id) {
if (!ok) {
return;
}
if (!app_->playlist_manager()->IsPlaylistOpen(p)) {
qLog(Error) << "Playlist isn't opened!";
return;
}
app_->playlist_manager()->SetActivePlaylist(p);
app_->player()->Next();
}