From 8eaa3cfac96730f1bf53f7418625ff9181c60fea Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sat, 11 Mar 2023 16:12:10 -0500 Subject: [PATCH] Do not try to process invalid ratsnest nodes Fixes https://gitlab.com/kicad/code/kicad/-/issues/14254 --- pcbnew/board.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index 3f2a581f74..024e11e0e3 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -289,7 +289,8 @@ void BOARD::UpdateRatsnestExclusions() GetConnectivity()->RunOnUnconnectedEdges( [&]( CN_EDGE& aEdge ) { - if( aEdge.GetSourceNode() && aEdge.GetTargetNode() ) + if( aEdge.GetSourceNode() && aEdge.GetTargetNode() + && aEdge.GetSourceNode()->Valid() && aEdge.GetTargetNode()->Valid() ) { std::pair ids = { aEdge.GetSourceNode()->Parent()->m_Uuid, aEdge.GetTargetNode()->Parent()->m_Uuid };