From c6632bddedf5d1f8949625c0551c3946d8abb67e Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 31 Oct 2017 12:33:00 -0700 Subject: [PATCH] Eeschema: Remove zero-length wires in RemoveBacktracks RemoveBacktracks call removes zero-length wires as well --- eeschema/bus-wire-junction.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index 528d09d686..fa0175463e 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -74,6 +74,12 @@ static void RemoveBacktracks( DLIST& aWires ) SCH_LINE *line = static_cast( p ); p = line->Next(); + if( line->IsNull() ) + { + delete s_wires.Remove( line ); + continue; + } + if( !last_lines.empty() ) { SCH_LINE* last_line = last_lines[last_lines.size() - 1];