diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp index fc505795df..121f4670f3 100644 --- a/common/eda_draw_frame.cpp +++ b/common/eda_draw_frame.cpp @@ -452,10 +452,11 @@ void EDA_DRAW_FRAME::PushTool( const std::string& actionName ) void EDA_DRAW_FRAME::PopTool() { - if( m_toolStack.size() > 1 ) - { + if( m_toolStack.size() > 0 ) m_toolStack.pop_back(); + if( m_toolStack.size() > 0 ) + { TOOL_ACTION* action = m_toolManager->GetActionManager()->FindAction( m_toolStack.back() ); if( action )