Merge pull request #567 from cmitu/master

Fix 'Last Played' collection crash.
This commit is contained in:
pjft 2019-06-12 12:50:19 +01:00 committed by GitHub
commit 9c7cdcece9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -292,7 +292,7 @@ void CollectionSystemManager::updateCollectionSystem(FileData* file, CollectionS
void CollectionSystemManager::trimCollectionCount(FileData* rootFolder, int limit)
{
SystemData* curSys = rootFolder->getSystem();
while ((int)rootFolder->getChildren().size() > limit)
while ((int)rootFolder->getChildrenListToDisplay().size() > limit)
{
CollectionFileData* gameToRemove = (CollectionFileData*)rootFolder->getChildrenListToDisplay().back();
ViewController::get()->getGameListView(curSys).get()->remove(gameToRemove, false);