mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-15 02:33:15 +02:00
Avoid crashed in eeschema after selecting/deselecting and reselecting highlight tool or delete tool
It was due to use of items in std::deque without testing if these items exist.
This commit is contained in:
parent
da645c5d16
commit
e800bc5ffe
@ -452,10 +452,10 @@ void EDA_DRAW_FRAME::PushTool( const std::string& actionName )
|
|||||||
|
|
||||||
void EDA_DRAW_FRAME::PopTool()
|
void EDA_DRAW_FRAME::PopTool()
|
||||||
{
|
{
|
||||||
m_toolStack.pop_back();
|
if( m_toolStack.size() > 1 )
|
||||||
|
|
||||||
if( !m_toolStack.empty() )
|
|
||||||
{
|
{
|
||||||
|
m_toolStack.pop_back();
|
||||||
|
|
||||||
TOOL_ACTION* action = m_toolManager->GetActionManager()->FindAction( m_toolStack.back() );
|
TOOL_ACTION* action = m_toolManager->GetActionManager()->FindAction( m_toolStack.back() );
|
||||||
|
|
||||||
if( action )
|
if( action )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user