GUI: Fix crash when enabling auto save
"engineid" isn't present on all games. Games that predate the "engineid" feature and haven't been run since it was introduced don't have it yet. Fixes bug #13038
This commit is contained in:
parent
61c4cbe1f4
commit
2ac5fd5c02
1 changed files with 3 additions and 1 deletions
|
@ -2545,7 +2545,9 @@ bool GlobalOptionsDialog::updateAutosavePeriod(int newValue) {
|
|||
for (ConfigManager::DomainMap::const_iterator it = domains.begin(), end = domains.end(); it != end; ++it) {
|
||||
const Common::String target = it->_key;
|
||||
const ConfigManager::Domain domain = it->_value;
|
||||
const Common::String engine = domain["engineid"];
|
||||
// note that engineid isn't present on games that predate it
|
||||
// and haven't been run since it was introduced.
|
||||
const Common::String engine = domain.getValOrDefault("engineid");
|
||||
if (const Plugin *detectionPlugin = EngineMan.findPlugin(engine)) {
|
||||
if (const Plugin *plugin = PluginMan.getEngineFromMetaEngine(detectionPlugin)) {
|
||||
MetaEngine &metaEngine = plugin->get<MetaEngine>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue