Fix crash due to PCB_SHAPEs not being returned by BOARD::AllConnectedItems

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16981
This commit is contained in:
Marek Roszko 2024-02-15 19:58:21 -05:00
parent 407bb10197
commit c48fc7ebff
1 changed files with 8 additions and 0 deletions

View File

@ -2269,6 +2269,14 @@ const std::vector<BOARD_CONNECTED_ITEM*> BOARD::AllConnectedItems()
for( ZONE* zone : Zones() )
items.push_back( zone );
for( BOARD_ITEM* item : Drawings() )
{
if( item->Type() == PCB_SHAPE_T )
{
items.push_back( dynamic_cast<PCB_SHAPE*>( item ) );
}
}
return items;
}