check for emptiness in some more places
these containers can be empty escpecially if one wants to go for a trip around ncmpcpp screens while connection to mpd is lost. this is highly unlikely to happen, but should be secured anyway.
This commit is contained in:
@@ -233,6 +233,8 @@ MPD::Song *SearchEngine::CurrentSong()
|
||||
|
||||
void SearchEngine::GetSelectedSongs(MPD::SongList &v)
|
||||
{
|
||||
if (w->Empty())
|
||||
return;
|
||||
std::vector<size_t> selected;
|
||||
w->GetSelected(selected);
|
||||
if (selected.empty() && w->Choice() >= StaticOptions)
|
||||
|
||||
Reference in New Issue
Block a user