mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-01 20:38:06 +01:00
Check playlist exists in manager. Fixes issue 3878
(cherry picked from commit 2e18b7eb96
)
This commit is contained in:
parent
ce117da026
commit
cdd5bf928c
@ -268,7 +268,11 @@ void PlaylistListContainer::CurrentChanged(Playlist* new_playlist) {
|
|||||||
void PlaylistListContainer::PlaylistPathChanged(int id, const QString& new_path) {
|
void PlaylistListContainer::PlaylistPathChanged(int id, const QString& new_path) {
|
||||||
// Update the path in the database
|
// Update the path in the database
|
||||||
app_->playlist_backend()->SetPlaylistUiPath(id, new_path);
|
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) {
|
void PlaylistListContainer::ItemDoubleClicked(const QModelIndex& proxy_index) {
|
||||||
|
Loading…
Reference in New Issue
Block a user