Don't report a pin if the pin is null

The pins can exist on a different sheet from the no-connect.  In this
case, we do not set the ERC for the current sheet to the remote pins,
instead only link the NC
This commit is contained in:
Seth Hillbrand 2022-12-12 19:29:15 -08:00
parent d3228dbab2
commit bc8366cd95
1 changed files with 5 additions and 1 deletions

View File

@ -2873,7 +2873,11 @@ bool CONNECTION_GRAPH::ercCheckNoConnects( const CONNECTION_SUBGRAPH* aSubgraph
if( unique_pins.size() > 1 && settings.IsTestEnabled( ERCE_NOCONNECT_CONNECTED ) )
{
std::shared_ptr<ERC_ITEM> ercItem = ERC_ITEM::Create( ERCE_NOCONNECT_CONNECTED );
ercItem->SetItems( pin, aSubgraph->m_no_connect );
if( pin )
ercItem->SetItems( pin, aSubgraph->m_no_connect );
else
ercItem->SetItems( aSubgraph->m_no_connect );
SCH_MARKER* marker = new SCH_MARKER( ercItem, pin->GetTransformedPosition() );
screen->Append( marker );