From d4cbc348de7ed40dfb2854e000eea80e31813dcb Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 3 Mar 2020 13:45:07 -0800 Subject: [PATCH] PNS: avoid committing route with nothing The node is not neccesarily populated when committing, so we need to check for validity first. Fixes #3984 | https://gitlab.com/kicad/code/kicad/issues/3984 --- pcbnew/router/pns_line_placer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 99827a52be..15d18d0ba1 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -1252,7 +1252,8 @@ bool LINE_PLACER::HasPlacedAnything() const bool LINE_PLACER::CommitPlacement() { - Router()->CommitRouting( m_lastNode ); + if( m_lastNode ) + Router()->CommitRouting( m_lastNode ); m_lastNode = NULL; m_currentNode = NULL;