Fixed an issue where randomly selecting an empty custom collection could crash the application.

This commit is contained in:
Leon Styhre 2021-01-02 15:11:56 +01:00
parent 145cbf8df7
commit 5565170d93

View file

@ -571,8 +571,7 @@ FileData* SystemData::getRandomGame(const FileData* currentGame)
// otherwise get a list of all the folder and file entries in the view.
if (currentGame && currentGame->getType() == FOLDER && currentGame->
getSystem()->isGroupedCustomCollection()) {
gameList = ViewController::get()->getGameListView(mRootFolder->getSystem()).get()->
getCursor()->getParent()->getParent()->getChildrenListToDisplay();
gameList = mRootFolder->getParent()->getChildrenListToDisplay();
}
else {
gameList = ViewController::get()->getGameListView(mRootFolder->