Fix bug when poping only tool on stack.

This commit is contained in:
Jeff Young 2019-06-27 00:18:38 +01:00
parent 5e40de9357
commit 6253b44f20
1 changed files with 3 additions and 2 deletions

View File

@ -452,10 +452,11 @@ void EDA_DRAW_FRAME::PushTool( const std::string& actionName )
void EDA_DRAW_FRAME::PopTool() void EDA_DRAW_FRAME::PopTool()
{ {
if( m_toolStack.size() > 1 ) if( m_toolStack.size() > 0 )
{
m_toolStack.pop_back(); m_toolStack.pop_back();
if( m_toolStack.size() > 0 )
{
TOOL_ACTION* action = m_toolManager->GetActionManager()->FindAction( m_toolStack.back() ); TOOL_ACTION* action = m_toolManager->GetActionManager()->FindAction( m_toolStack.back() );
if( action ) if( action )