Solids don't always have nets (even a defualt one).

Fixes https://gitlab.com/kicad/code/kicad/issues/5290
This commit is contained in:
Jeff Young 2020-08-21 20:07:45 +01:00
parent 9878a1e10c
commit 842641308f
1 changed files with 5 additions and 1 deletions

View File

@ -269,7 +269,11 @@ int PNS_PCBNEW_RULE_RESOLVER::Clearance( const PNS::ITEM* aA, const PNS::ITEM* a
int PNS_PCBNEW_RULE_RESOLVER::Clearance( int aNetCode ) const int PNS_PCBNEW_RULE_RESOLVER::Clearance( int aNetCode ) const
{ {
if( aNetCode == 0 ) if( aNetCode == -1 )
{
return 0;
}
else if( aNetCode == 0 )
{ {
return m_defaultClearance; return m_defaultClearance;
} }