PNS: Safety for evaluating item nets for rules
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993
This commit is contained in:
parent
39a1b14a0f
commit
459473ccc3
|
@ -896,6 +896,9 @@ static void inDiffPairFunc( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
{
|
||||
NETINFO_ITEM* netinfo = static_cast<BOARD_CONNECTED_ITEM*>( item )->GetNet();
|
||||
|
||||
if( !netinfo )
|
||||
return 0.0;
|
||||
|
||||
wxString refName = netinfo->GetNetname();
|
||||
wxString arg = argv->AsString();
|
||||
wxString baseName, coupledNet;
|
||||
|
|
|
@ -738,6 +738,9 @@ bool PNS_KICAD_IFACE_BASE::ImportSizes( PNS::SIZES_SETTINGS& aSizes, PNS::ITEM*
|
|||
int holeToHoleMin = bds.m_HoleToHoleMin;
|
||||
PNS::VIA dummyVia;
|
||||
|
||||
if( aStartItem )
|
||||
dummyVia.SetNet( aStartItem->Net() );
|
||||
|
||||
if( m_ruleResolver->QueryConstraint( PNS::CONSTRAINT_TYPE::CT_HOLE_TO_HOLE, &dummyVia,
|
||||
&dummyVia, UNDEFINED_LAYER, &constraint ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue