fixed multiple images crash when no images exist

This commit is contained in:
Thomas Jentzsch 2022-08-22 09:35:53 +02:00
parent 31efb08742
commit a7e19d1d6b
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ bool RomImageWidget::changeImage(int direction)
#ifdef IMAGE_SUPPORT
if(direction == -1 && myImageIdx)
return loadImage(myImageList[--myImageIdx].getPath());
else if(direction == 1 && myImageIdx < myImageList.size() - 1)
else if(direction == 1 && myImageIdx + 1 < myImageList.size())
return loadImage(myImageList[++myImageIdx].getPath());
#endif
return false;