Check playlist exists in manager. Fixes issue 3878

This commit is contained in:
Arnaud Bienner 2013-10-03 20:36:46 +02:00
parent fb78321c16
commit 2e18b7eb96
1 changed files with 5 additions and 1 deletions

View File

@ -268,7 +268,11 @@ void PlaylistListContainer::CurrentChanged(Playlist* new_playlist) {
void PlaylistListContainer::PlaylistPathChanged(int id, const QString& new_path) {
// Update the path in the database
app_->playlist_backend()->SetPlaylistUiPath(id, new_path);
app_->playlist_manager()->playlist(id)->set_ui_path(new_path);
Playlist* playlist = app_->playlist_manager()->playlist(id);
// Check the playlist exists (if it's not opened it's not in the manager)
if (playlist) {
playlist->set_ui_path(new_path);
}
}
void PlaylistListContainer::ItemDoubleClicked(const QModelIndex& proxy_index) {