mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
Fixes favorites crashing when removing last entry
Regression somewhere down the line.
This commit is contained in:
parent
ca046f75f1
commit
f29452e533
|
@ -111,7 +111,7 @@ void BasicGameListView::remove(FileData *game, bool deleteFile)
|
|||
{
|
||||
std::vector<FileData*> siblings = parent->getChildrenListToDisplay();
|
||||
auto gameIter = std::find(siblings.cbegin(), siblings.cend(), game);
|
||||
unsigned int gamePos = (int)std::distance(siblings.cbegin(), gameIter);
|
||||
int gamePos = (int)std::distance(siblings.cbegin(), gameIter);
|
||||
if (gameIter != siblings.cend())
|
||||
{
|
||||
if ((gamePos + 1) < siblings.size())
|
||||
|
|
Loading…
Reference in a new issue