eeschema: Fixed use-after-free on exit when paste operation is aborted

This commit is contained in:
Maciej Suminski 2017-07-13 13:30:58 +02:00
parent c93ab4d5da
commit d5095252a0
1 changed files with 1 additions and 2 deletions

View File

@ -220,8 +220,7 @@ void AbortBlockCurrentCommand( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
screen->SetCurItem( NULL ); screen->SetCurItem( NULL );
// Delete the picked wrapper if this is a picked list. // Delete the picked wrapper if this is a picked list.
if( screen->m_BlockLocate.GetCommand() != BLOCK_PASTE ) screen->m_BlockLocate.ClearItemsList();
screen->m_BlockLocate.ClearItemsList();
} }
screen->m_BlockLocate.SetState( STATE_NO_BLOCK ); screen->m_BlockLocate.SetState( STATE_NO_BLOCK );