Check if selection is not empty before modifying it in EDIT_TOOL
Fixes: lp:1661311 * https://bugs.launchpad.net/kicad/+bug/1661311
This commit is contained in:
parent
340da50315
commit
8dadc18429
|
@ -179,6 +179,9 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
if( evt->IsAction( &COMMON_ACTIONS::editActivate )
|
||||
|| evt->IsMotion() || evt->IsDrag( BUT_LEFT ) )
|
||||
{
|
||||
if( selection.Empty() )
|
||||
break;
|
||||
|
||||
BOARD_ITEM* curr_item = selection.Front();
|
||||
|
||||
if( m_dragging && evt->Category() == TC_MOUSE )
|
||||
|
|
Loading…
Reference in New Issue