diff --git a/Source/Project64/Settings/Settings Class.cpp b/Source/Project64/Settings/Settings Class.cpp index e4b2d0dc3..e291a3cf9 100644 --- a/Source/Project64/Settings/Settings Class.cpp +++ b/Source/Project64/Settings/Settings Class.cpp @@ -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)