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.

This commit is contained in:
jean-pierre charras 2012-07-21 18:52:29 +02:00
parent 9e20800f8c
commit 4f01bedf97
1 changed files with 2 additions and 1 deletions

View File

@ -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 )
{