add missing null check

This commit is contained in:
HJfod 2024-09-15 23:59:49 +03:00
parent 76b1397c71
commit c3e7f235e0

View file

@ -110,6 +110,7 @@ public:
void saveSettingValueToSave(std::string const& key) { void saveSettingValueToSave(std::string const& key) {
if (this->settings.contains(key)) { if (this->settings.contains(key)) {
auto& sett = this->settings.at(key); auto& sett = this->settings.at(key);
if (!sett.v3) return;
// Store the value in an intermediary so if `save` fails the existing // Store the value in an intermediary so if `save` fails the existing
// value loaded from disk isn't overwritten // value loaded from disk isn't overwritten
matjson::Value value; matjson::Value value;