Fixed a potential crash when reloading the application

This commit is contained in:
Leon Styhre 2023-09-17 12:45:00 +02:00
parent 2adde87050
commit e6a802805c

View file

@ -71,9 +71,13 @@ void GuiSettings::save()
for (auto system : SystemData::sSystemVector)
system->writeMetaData();
}
// If a close menu function was passed to us, then run it.
if (mCloseMenuFunction)
if (mCloseMenuFunction) {
mCloseMenuFunction();
mCloseMenuFunction = nullptr;
}
ViewController::getInstance()->rescanROMDirectory();
return;
}