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:
parent
9f95909848
commit
7a089faa29
|
@ -462,7 +462,7 @@ int Playlist::next_row() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Still off the end? Then just give up
|
// 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 -1;
|
||||||
|
|
||||||
return virtual_items_[next_virtual_index];
|
return virtual_items_[next_virtual_index];
|
||||||
|
|
Loading…
Reference in New Issue