diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index 782eaf6496..228b907c38 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -262,10 +262,13 @@ void BOARD::UpdateRatsnestExclusions() GetConnectivity()->RunOnUnconnectedEdges( [&]( CN_EDGE& aEdge ) { - std::pair ids = { aEdge.GetSourceNode()->Parent()->m_Uuid, - aEdge.GetTargetNode()->Parent()->m_Uuid }; + if( aEdge.GetSourceNode() && aEdge.GetTargetNode() ) + { + std::pair ids = { aEdge.GetSourceNode()->Parent()->m_Uuid, + aEdge.GetTargetNode()->Parent()->m_Uuid }; - aEdge.SetVisible( m_ratsnestExclusions.count( ids ) == 0 ); + aEdge.SetVisible( m_ratsnestExclusions.count( ids ) == 0 ); + } return true; } );