mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-27 09:08:50 +01:00
Prevent RetroFE crash when pressing forward/back in an empty collection.
This commit is contained in:
parent
d760ec5e5d
commit
a64e44eca8
@ -641,6 +641,11 @@ void ScrollingList::updateScrollPeriod()
|
||||
void ScrollingList::scroll(bool forward)
|
||||
{
|
||||
|
||||
if(items_->size() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(forward)
|
||||
{
|
||||
Item *i = items_->at(loopIncrement(itemIndex_, scrollPoints_->size(), items_->size()));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user