Fix crash when jumping to playing song in playlist editor
By default, PlaylistEditor delays fetching of the content for performance reasons. If the user switches the playlist then tells ncmpcpp to jump to the currently playing song within the delay, the update request that fetches the new content will be ignored. This results in inconsistent content, or crash if the position of the song in the new content exceeds the length of the stale content. This fix enforces a fetch even if the update request that fetches the new content stays within the delay.
This commit is contained in:
committed by
Andrzej Rybczak
parent
86d24b26a8
commit
4eae285160
@@ -485,7 +485,7 @@ void PlaylistEditor::locatePlaylist(const MPD::Playlist &playlist)
|
||||
void PlaylistEditor::gotoSong(size_t playlist_index, size_t song_index)
|
||||
{
|
||||
Playlists.highlight(playlist_index);
|
||||
Content.clear();
|
||||
requestContentsUpdate();
|
||||
update();
|
||||
Content.highlight(song_index);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user