[Scummvm-git-logs] scummvm branch-2-5 -> 60aa46f3028c0881222c89e037c1053b75e4bd37
criezy
criezy at scummvm.org
Thu Nov 11 22:44:32 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
60aa46f302 GUI: Fix crash when enabling auto save
Commit: 60aa46f3028c0881222c89e037c1053b75e4bd37
https://github.com/scummvm/scummvm/commit/60aa46f3028c0881222c89e037c1053b75e4bd37
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-11-11T22:43:55Z
Commit Message:
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
Changed paths:
gui/options.cpp
diff --git a/gui/options.cpp b/gui/options.cpp
index 6838a1a66f..d62ed5db6a 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2539,7 +2539,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>();
More information about the Scummvm-git-logs
mailing list