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

(cherry picked from commit bc8366cd95)
This commit is contained in:
Seth Hillbrand 2022-12-12 19:29:15 -08:00
parent ee05b67599
commit 948071183c
1 changed files with 5 additions and 1 deletions

View File

@ -2725,7 +2725,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 );