Do not try to process invalid ratsnest nodes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14254
This commit is contained in:
Jon Evans 2023-03-11 16:12:10 -05:00
parent 74f064d3aa
commit 8eaa3cfac9
1 changed files with 2 additions and 1 deletions

View File

@ -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<KIID, KIID> ids = { aEdge.GetSourceNode()->Parent()->m_Uuid,
aEdge.GetTargetNode()->Parent()->m_Uuid };