Fix crash in ConfigItem::ActivateItems

refs #10643
This commit is contained in:
Gunnar Beutner 2015-11-23 17:25:35 +01:00 committed by Michael Friedrich
parent d3aae81323
commit 21cb5690f5
1 changed files with 3 additions and 1 deletions

View File

@ -313,8 +313,10 @@ void ConfigItem::Register(void)
*/
void ConfigItem::Unregister(void)
{
if (m_Object)
if (m_Object) {
m_Object->Unregister();
m_Object.reset();
}
boost::mutex::scoped_lock lock(m_Mutex);
m_UnnamedItems.erase(std::remove(m_UnnamedItems.begin(), m_UnnamedItems.end(), this), m_UnnamedItems.end());