From 842641308f48907987198bfde239dcaa10a7ec02 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 21 Aug 2020 20:07:45 +0100 Subject: [PATCH] Solids don't always have nets (even a defualt one). Fixes https://gitlab.com/kicad/code/kicad/issues/5290 --- pcbnew/router/pns_kicad_iface.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index fb3afa8196..5456585e50 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -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 { - if( aNetCode == 0 ) + if( aNetCode == -1 ) + { + return 0; + } + else if( aNetCode == 0 ) { return m_defaultClearance; }