Don't try to copy a null item.
Fixes: lp:1836126 * https://bugs.launchpad.net/kicad/+bug/1836126
This commit is contained in:
parent
6c9e34e799
commit
34894acb89
|
@ -359,11 +359,14 @@ void SCH_EDIT_FRAME::SaveCopyForRepeatItem( SCH_ITEM* aItem )
|
|||
// that item may be deleted, such as part of a line concatenation or other.
|
||||
// So simply always keep a copy of the object which is to be repeated.
|
||||
|
||||
delete m_item_to_repeat;
|
||||
if( aItem )
|
||||
{
|
||||
delete m_item_to_repeat;
|
||||
|
||||
m_item_to_repeat = (SCH_ITEM*) aItem->Clone();
|
||||
// Clone() preserves the flags, we want 'em cleared.
|
||||
m_item_to_repeat->ClearFlags();
|
||||
m_item_to_repeat = (SCH_ITEM*) aItem->Clone();
|
||||
// Clone() preserves the flags, we want 'em cleared.
|
||||
m_item_to_repeat->ClearFlags();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -797,7 +797,7 @@ void SCH_LINE_WIRE_BUS_TOOL::finishSegments()
|
|||
}
|
||||
|
||||
// Get the last non-null wire (this is the last created segment).
|
||||
m_frame->SaveCopyForRepeatItem( s_wires.GetLast());
|
||||
m_frame->SaveCopyForRepeatItem( s_wires.GetLast() );
|
||||
|
||||
// Add the new wires
|
||||
while( s_wires.GetFirst() )
|
||||
|
|
Loading…
Reference in New Issue