Defensive coding.
Fixes https://gitlab.com/kicad/code/kicad/issues/8790
This commit is contained in:
parent
d9cf939ba1
commit
98d0ce00ee
|
@ -168,8 +168,11 @@ FOOTPRINT::FOOTPRINT( const FOOTPRINT& aFootprint ) :
|
||||||
newGroup->GetItems().clear();
|
newGroup->GetItems().clear();
|
||||||
|
|
||||||
for( BOARD_ITEM* member : group->GetItems() )
|
for( BOARD_ITEM* member : group->GetItems() )
|
||||||
|
{
|
||||||
|
if( ptrMap.count( member ) )
|
||||||
newGroup->AddItem( ptrMap[ member ] );
|
newGroup->AddItem( ptrMap[ member ] );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Copy auxiliary data: 3D_Drawings info
|
// Copy auxiliary data: 3D_Drawings info
|
||||||
m_3D_Drawings = aFootprint.m_3D_Drawings;
|
m_3D_Drawings = aFootprint.m_3D_Drawings;
|
||||||
|
|
Loading…
Reference in New Issue