From aebb8b3ff9c7f10e383e5f1e331d1c3d60312570 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Dec 2013 13:57:56 +0100 Subject: [PATCH] Fixed an infinite loop in the destructor of ACTION_MANAGER; --- common/tool/action_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index fde03fb510..a00d4d08cc 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -67,13 +67,13 @@ void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) void ACTION_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) { + m_actionNameIndex.erase( aAction->m_name ); + m_actionIdIndex.erase( aAction->m_id ); + // Indicate that the ACTION_MANAGER no longer care about the object aAction->setActionMgr( NULL ); aAction->setId( -1 ); - m_actionNameIndex.erase( aAction->m_name ); - m_actionIdIndex.erase( aAction->m_id ); - if( aAction->HasHotKey() ) m_actionHotKeys.erase( aAction->m_currentHotKey ); }