From b03064e55b381c9ab5f46470730d0494f565f789 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 25 Nov 2023 16:31:48 +0000 Subject: [PATCH] Fix IniLoadSettings --- src/settings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/settings.cpp b/src/settings.cpp index f5d0bc420b..8a3b89badc 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -712,7 +712,9 @@ static void IniLoadSettings(IniFile &ini, const SettingTable &settings_table, co /* For settings.xx.zz.yy load the settings from [zz] yy = ? in case the previous * did not exist (e.g. loading old config files with a [yapf] section */ sc = s.find('.'); - if (sc != std::string::npos) item = ini.GetGroup(s.substr(0, sc))->GetItem(s.substr(sc + 1)); + if (sc != std::string::npos) { + if (group = ini.GetGroup(s.substr(0, sc)); group != nullptr) item = group->GetItem(s.substr(sc + 1)); + } } if (item == nullptr && sd->guiproc != nullptr) { SettingOnGuiCtrlData data;