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
This commit is contained in:
Seth Hillbrand 2020-03-03 13:45:07 -08:00
parent 349c0e1a14
commit d4cbc348de
1 changed files with 2 additions and 1 deletions

View File

@ -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;