mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 17:45:38 +00:00
Fix 'Last Played' collection crash.
This commit is contained in:
parent
3fdaa2aafb
commit
573cd4cdd5
|
@ -292,7 +292,7 @@ void CollectionSystemManager::updateCollectionSystem(FileData* file, CollectionS
|
||||||
void CollectionSystemManager::trimCollectionCount(FileData* rootFolder, int limit)
|
void CollectionSystemManager::trimCollectionCount(FileData* rootFolder, int limit)
|
||||||
{
|
{
|
||||||
SystemData* curSys = rootFolder->getSystem();
|
SystemData* curSys = rootFolder->getSystem();
|
||||||
while ((int)rootFolder->getChildren().size() > limit)
|
while ((int)rootFolder->getChildrenListToDisplay().size() > limit)
|
||||||
{
|
{
|
||||||
CollectionFileData* gameToRemove = (CollectionFileData*)rootFolder->getChildrenListToDisplay().back();
|
CollectionFileData* gameToRemove = (CollectionFileData*)rootFolder->getChildrenListToDisplay().back();
|
||||||
ViewController::get()->getGameListView(curSys).get()->remove(gameToRemove, false);
|
ViewController::get()->getGameListView(curSys).get()->remove(gameToRemove, false);
|
||||||
|
|
Loading…
Reference in a new issue