Don't query first item of empty vector.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16687
This commit is contained in:
parent
2627c99654
commit
6fca467e2a
|
@ -350,7 +350,7 @@ void PCB_BASE_FRAME::FocusOnItems( std::vector<BOARD_ITEM*> aItems, PCB_LAYER_ID
|
|||
|
||||
focusPt = item->GetPosition();
|
||||
|
||||
if( aLayer == UNDEFINED_LAYER )
|
||||
if( aLayer == UNDEFINED_LAYER && item->GetLayerSet().any() )
|
||||
aLayer = item->GetLayerSet().Seq()[0];
|
||||
|
||||
switch( item->Type() )
|
||||
|
|
Loading…
Reference in New Issue