mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Fixed a rare crash that could occur when enabling collections.
This commit is contained in:
parent
04ad50a3c5
commit
ab1129b2a0
|
@ -1193,8 +1193,11 @@ void ViewController::reloadAll()
|
|||
|
||||
// Clear all GamelistViews.
|
||||
std::map<SystemData*, FileData*> cursorMap;
|
||||
for (auto it = mGamelistViews.cbegin(); it != mGamelistViews.cend(); ++it)
|
||||
cursorMap[it->first] = it->second->getCursor();
|
||||
for (auto it = mGamelistViews.cbegin(); it != mGamelistViews.cend(); ++it) {
|
||||
if (std::find(SystemData::sSystemVector.cbegin(), SystemData::sSystemVector.cend(),
|
||||
(*it).first) != SystemData::sSystemVector.cend())
|
||||
cursorMap[it->first] = it->second->getCursor();
|
||||
}
|
||||
|
||||
mGamelistViews.clear();
|
||||
mCurrentView = nullptr;
|
||||
|
|
Loading…
Reference in a new issue