mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-30 12:05:39 +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.
|
// Clear all GamelistViews.
|
||||||
std::map<SystemData*, FileData*> cursorMap;
|
std::map<SystemData*, FileData*> cursorMap;
|
||||||
for (auto it = mGamelistViews.cbegin(); it != mGamelistViews.cend(); ++it)
|
for (auto it = mGamelistViews.cbegin(); it != mGamelistViews.cend(); ++it) {
|
||||||
cursorMap[it->first] = it->second->getCursor();
|
if (std::find(SystemData::sSystemVector.cbegin(), SystemData::sSystemVector.cend(),
|
||||||
|
(*it).first) != SystemData::sSystemVector.cend())
|
||||||
|
cursorMap[it->first] = it->second->getCursor();
|
||||||
|
}
|
||||||
|
|
||||||
mGamelistViews.clear();
|
mGamelistViews.clear();
|
||||||
mCurrentView = nullptr;
|
mCurrentView = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue