Fix a crash that ocurrs when something calls GetCaps over dbus before the playlist is initialised, and when a repeat mode is set.

This commit is contained in:
David Sansome 2011-01-07 19:16:45 +00:00
parent 9f95909848
commit 7a089faa29
1 changed files with 1 additions and 1 deletions

View File

@ -462,7 +462,7 @@ int Playlist::next_row() const {
}
// Still off the end? Then just give up
if (next_virtual_index >= virtual_items_.count())
if (next_virtual_index < 0 || next_virtual_index >= virtual_items_.count())
return -1;
return virtual_items_[next_virtual_index];