7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 17:03:44 +00:00

FOOTPRINT::GetBoundingHull(): don't crash on non-copper layers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20124
This commit is contained in:
Jeff Young 2025-02-28 18:46:04 +00:00
parent 26871b56f0
commit 2aa0c15b41

View File

@ -1620,8 +1620,13 @@ SHAPE_POLY_SET FOOTPRINT::GetBoundingHull( PCB_LAYER_ID aLayer ) const
for( ZONE* zone : m_zones )
{
if( const std::shared_ptr<SHAPE_POLY_SET>& layerPoly = zone->GetFilledPolysList( aLayer ) )
if( zone->GetIsRuleArea() )
continue;
if( zone->IsOnLayer( aLayer ) )
{
const std::shared_ptr<SHAPE_POLY_SET>& layerPoly = zone->GetFilledPolysList( aLayer );
for( int ii = 0; ii < layerPoly->OutlineCount(); ii++ )
rawPolys.AddOutline( layerPoly->COutline( ii ) );
}