mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
fix crash due to not checking if setting is loaded
This commit is contained in:
parent
8ce5700aad
commit
36853b785c
1 changed files with 3 additions and 0 deletions
|
@ -178,6 +178,9 @@ Result<> ModSettingsManager::load(matjson::Value const& json) {
|
|||
}
|
||||
void ModSettingsManager::save(matjson::Value& json) {
|
||||
for (auto& [key, sett] : m_impl->settings) {
|
||||
if (!sett.v3) {
|
||||
continue;
|
||||
}
|
||||
// Store the value in an intermediary so if `save` fails the existing
|
||||
// value loaded from disk isn't overwritten
|
||||
matjson::Value value;
|
||||
|
|
Loading…
Reference in a new issue