Skip to content
Snippets Groups Projects
Commit b67eab3b authored by Kahrl's avatar Kahrl
Browse files

Fix Settings::remove() always returning true

parent 87291ea4
No related branches found
No related tags found
No related merge requests found
......@@ -880,8 +880,14 @@ bool Settings::remove(const std::string &name)
{
MutexAutoLock lock(m_mutex);
delete m_settings[name].group;
return m_settings.erase(name);
std::map<std::string, SettingsEntry>::iterator it = m_settings.find(name);
if (it != m_settings.end()) {
delete it->second.group;
m_settings.erase(it);
return true;
} else {
return false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment