mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Merge pull request #323 from pjft/empty-favorites-fix
Fixes favorites crashing when removing last entry
This commit is contained in:
commit
ebe0101d4f
|
@ -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