fix memory leak in settings class

This commit is contained in:
zilmar 2015-03-04 05:56:13 +11:00
parent 892e63c473
commit 31bed730a8
1 changed files with 1 additions and 0 deletions

View File

@ -67,6 +67,7 @@ void CSettings::AddHandler ( SettingID TypeID, CSettingType * Handler )
SETTING_MAP::_Pairib res = m_SettingInfo.insert(SETTING_MAP::value_type(TypeID,Handler));
if (!res.second)
{
delete res.first->second;
m_SettingInfo.erase(res.first);
res = m_SettingInfo.insert(SETTING_MAP::value_type(TypeID,Handler));
if (!res.second)