Manually check pad layers before inserting
We do not rely on GetEffectiveShape(layer) to return null for layers
that the pad does not exist on.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21523
(cherry picked from commit 2e1910ca86)
This commit is contained in:
@@ -2560,7 +2560,7 @@ std::shared_ptr<GRAPH_NODE> CREEPAGE_GRAPH::AddNetElements( int aNetCode, PCB_LA
|
||||
{
|
||||
for( PAD* pad : footprint->Pads() )
|
||||
{
|
||||
if( pad->GetNetCode() != aNetCode )
|
||||
if( pad->GetNetCode() != aNetCode || !pad->GetLayerSet().test( aLayer ) )
|
||||
continue;
|
||||
|
||||
std::shared_ptr<SHAPE> padShape = pad->GetEffectiveShape( aLayer );
|
||||
|
||||
Reference in New Issue
Block a user