tool manager: Don't adjust the iterator to invalid
When finishing the first tool, we don't want to return an invalid iterator
This commit is contained in:
parent
11f0acefe2
commit
cbb88ce609
|
@ -837,6 +837,10 @@ TOOL_MANAGER::ID_LIST::iterator TOOL_MANAGER::finishTool( TOOL_STATE* aState )
|
|||
if( tool->GetType() == INTERACTIVE )
|
||||
static_cast<TOOL_INTERACTIVE*>( tool )->resetTransitions();
|
||||
|
||||
// Don't move the iterator past the stack beginning
|
||||
if( it == m_activeTools.begin() )
|
||||
return it;
|
||||
|
||||
return --it;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue