search engine: fix error occuring while trying to select first album in results

This commit is contained in:
Andrzej Rybczak
2011-01-09 10:21:25 +01:00
parent e42c1c1729
commit 07c540e67e
2 changed files with 13 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ class SearchEngine : public Screen< Menu< std::pair<Buffer *, MPD::Song *> > >
virtual bool isTabbable() { return true; }
virtual MPD::Song *CurrentSong();
virtual MPD::Song *GetSong(size_t pos) { return w->at(pos).second; }
virtual MPD::Song *GetSong(size_t pos) { return !w->isSeparator(pos) ? w->at(pos).second : 0; }
virtual bool allowsSelection() { return w->Choice() >= StaticOptions; }
virtual void ReverseSelection() { w->ReverseSelection(StaticOptions); }