Pcbnew fix: checking properties on error marker crashed pcbnew
Fixes: lp:1674671 https://bugs.launchpad.net/kicad/+bug/1674671
This commit is contained in:
parent
c20cf4a3e0
commit
5bd61d7eb6
|
@ -339,13 +339,18 @@ SELECTION& SELECTION_TOOL::RequestSelection( int aFlags )
|
|||
m_selection.SetIsHover( false );
|
||||
}
|
||||
|
||||
for( auto item : m_selection )
|
||||
// Be careful with iterators: items can be removed from list
|
||||
// that invalidate iterators.
|
||||
for( unsigned ii = 0; ii < m_selection.GetSize(); ii++ )
|
||||
{
|
||||
EDA_ITEM* item = m_selection[ii];
|
||||
|
||||
if( ( aFlags & SELECTION_EDITABLE ) && item->Type() == PCB_MARKER_T )
|
||||
{
|
||||
unselect( static_cast<BOARD_ITEM *>( item ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( aFlags & SELECTION_SANITIZE_PADS )
|
||||
SanitizeSelection();
|
||||
|
||||
|
|
Loading…
Reference in New Issue