Eeschema: fix an assert ( "meOwner" failed in DeleteAll() ) when appending a sheet from an other project to the schematic.
It was only a overzealous (in this case) assert, with no issue. The fix avoid calling DeleteAll() when there is nothing to delete. Fixes: lp:1787810 https://bugs.launchpad.net/kicad/+bug/1787810
This commit is contained in:
parent
7e2e39ce30
commit
333ba4b9a2
|
@ -117,6 +117,12 @@ SCH_SCREEN::SCH_SCREEN( KIWAY* aKiway ) :
|
|||
SCH_SCREEN::~SCH_SCREEN()
|
||||
{
|
||||
ClearUndoRedoList();
|
||||
|
||||
// Now delete items in draw list. We do that only if the list is not empty,
|
||||
// because if the list was appended to another list (see SCH_SCREEN::Append( SCH_SCREEN* aScreen )
|
||||
// it is empty but as no longer the ownership (m_drawList.meOwner == false) of items, and calling
|
||||
// FreeDrawList() with m_drawList.meOwner == false will generate a debug alert in debug mode
|
||||
if( GetDrawItems() )
|
||||
FreeDrawList();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue