diff --git a/src/playlist/playlistlistmodel.cpp b/src/playlist/playlistlistmodel.cpp index ddedacfb4..a3b943780 100644 --- a/src/playlist/playlistlistmodel.cpp +++ b/src/playlist/playlistlistmodel.cpp @@ -133,8 +133,8 @@ void PlaylistListModel::RowsAboutToBeRemoved(const QModelIndex &parent, const in switch (idx.data(Role_Type).toInt()) { case Type_Playlist:{ const int id = idx.data(Role_PlaylistId).toInt(); - QMap::iterator it = playlists_by_id_.find(id); - if (it != playlists_by_id_.end() && it.value() == item) { + QMap::const_iterator it = playlists_by_id_.constFind(id); + if (it != playlists_by_id_.constEnd() && it.value() == item) { playlists_by_id_.erase(it); } break;