We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87291ea commit b67eab3Copy full SHA for b67eab3
src/settings.cpp
@@ -880,8 +880,14 @@ bool Settings::remove(const std::string &name)
880
{
881
MutexAutoLock lock(m_mutex);
882
883
- delete m_settings[name].group;
884
- return m_settings.erase(name);
+ std::map<std::string, SettingsEntry>::iterator it = m_settings.find(name);
+ if (it != m_settings.end()) {
885
+ delete it->second.group;
886
+ m_settings.erase(it);
887
+ return true;
888
+ } else {
889
+ return false;
890
+ }
891
}
892
893
0 commit comments