commit: protect against un-copyable error
This creates early asserts for issues where we haven't fully implemented a Clone() function for items or haven't correctly filtered them before creating the undo/redo commit.
This commit is contained in:
parent
d15876595f
commit
c84752b9a7
|
@ -64,7 +64,19 @@ COMMIT& COMMIT::Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType )
|
|||
case CHT_MODIFY:
|
||||
{
|
||||
EDA_ITEM* parent = parentObject( aItem );
|
||||
return createModified( parent, parent->Clone(), flag );
|
||||
EDA_ITEM* clone = nullptr;
|
||||
|
||||
assert( parent );
|
||||
|
||||
if( parent )
|
||||
clone = parent->Clone();
|
||||
|
||||
assert( clone );
|
||||
|
||||
if( clone )
|
||||
return createModified( parent, clone, flag );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue