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
e33e8d02e9
commit
24149a87fa
|
@ -117,7 +117,13 @@ SCH_SCREEN::SCH_SCREEN( KIWAY* aKiway ) :
|
||||||
SCH_SCREEN::~SCH_SCREEN()
|
SCH_SCREEN::~SCH_SCREEN()
|
||||||
{
|
{
|
||||||
ClearUndoRedoList();
|
ClearUndoRedoList();
|
||||||
FreeDrawList();
|
|
||||||
|
// 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