From 2f35d97b27945a7e92f06b3064f0ea26c8877298 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Thu, 22 Jun 2023 23:52:11 +0200 Subject: [PATCH] router: when no collision search context is provided, assume differentNetsOnly is true (cherry picked from commit a0a68d198cfb54a42e92cb09ce77cd6967470ea5) --- pcbnew/router/pns_item.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/pns_item.cpp b/pcbnew/router/pns_item.cpp index dc225436ec..cc661ecefe 100644 --- a/pcbnew/router/pns_item.cpp +++ b/pcbnew/router/pns_item.cpp @@ -152,9 +152,14 @@ bool ITEM::collideSimple( const ITEM* aHead, const NODE* aNode, // fixme: this f***ing singleton must go... ROUTER* router = ROUTER::GetInstance(); ROUTER_IFACE* iface = router ? router->GetInterface() : nullptr; - bool differentNetsOnly = aCtx && aCtx->options.m_differentNetsOnly; + bool differentNetsOnly = true; int clearance; + if( aCtx ) + { + differentNetsOnly = aCtx->options.m_differentNetsOnly; + } + // Hole-to-hole collisions don't have anything to do with nets if( Kind() == HOLE_T && aHead->Kind() == HOLE_T ) differentNetsOnly = false;