Assertion checking for hole/parent ownership mismatch.
(This mismatch is the root of the problem in issue #14852.)
This commit is contained in:
parent
df4fefeb20
commit
3c8d2bfca5
|
@ -94,8 +94,19 @@ NODE::~NODE()
|
||||||
for( ITEM* item : *m_index )
|
for( ITEM* item : *m_index )
|
||||||
{
|
{
|
||||||
if( item->BelongsTo( this ) && item->OfKind( ITEM::HOLE_T ) )
|
if( item->BelongsTo( this ) && item->OfKind( ITEM::HOLE_T ) )
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
HOLE* hole = static_cast<HOLE*>( item );
|
||||||
|
|
||||||
|
// If a hole is no longer owned by the same NODE as its parent then we're in a
|
||||||
|
// heap of trouble.
|
||||||
|
if( hole->ParentPadVia() && !hole->ParentPadVia()->BelongsTo( this ) )
|
||||||
|
assert( false );
|
||||||
|
#endif
|
||||||
|
|
||||||
toDelete.push_back( item );
|
toDelete.push_back( item );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for( const ITEM* item : toDelete )
|
for( const ITEM* item : toDelete )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue