Fix crash when unfolding bus.

Thanks to Julien Faucher for the investigation into the problem.
This commit is contained in:
Jeff Young 2019-04-28 18:41:17 +01:00
parent 10900c918f
commit 3aaba79b87
1 changed files with 2 additions and 10 deletions

View File

@ -954,17 +954,9 @@ int SCH_DRAWING_TOOL::doDrawSegments( int aType, SCH_LINE* aSegment )
m_frame->AddToScreen( m_busUnfold.label );
m_busUnfold.label_placed = true;
aSegment->ClearFlags( IS_NEW );
aSegment->SetFlags( SELECTED );
aSegment = new SCH_LINE( *aSegment );
aSegment->SetFlags( IS_NEW );
aSegment->SetStartPoint( cursorPos );
s_wires.PushBack( aSegment );
screen->SetCurItem( aSegment );
}
else if( !aSegment )
if( !aSegment )
{
aSegment = startSegments( aType, cursorPos );
}