From 4f01bedf97b045345414abaa3ad5f168a7fc0f4c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 21 Jul 2012 18:52:29 +0200 Subject: [PATCH] Eeschema: fix a bug that crashes eeschema (only when compiled in debug mode) when creating a new wire, and when any wire orientation is allowed. --- eeschema/bus-wire-junction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index 724ed17dcc..dcca3a87dd 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -167,7 +167,8 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type ) { SCH_LINE* prevSegment = (SCH_LINE*) segment->Back(); - wxLogDebug( wxT( "Adding new segment after " ) + prevSegment->GetSelectMenuText() ); + // Be aware prevSegment can be null when the horizontal and vertical lines only switch is off + // when we create the first segment. if( !g_HVLines ) {