Skip to content
Permalink
Browse files

Fix Settings::remove() always returning true

  • Loading branch information
kahrl committed Jan 19, 2016
1 parent 87291ea commit b67eab3b0050a1f08d9c56138969d1a659ee7eac
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/settings.cpp
@@ -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 comments on commit b67eab3

Please sign in to comment.