protect protect RC_ITEM::SetItems() against null pointer.

Fixes #15865
https://gitlab.com/kicad/code/kicad/-/issues/15865
This commit is contained in:
jean-pierre charras 2023-10-12 14:56:56 +02:00
parent 9159f5a004
commit 58a6eb653b
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ void RC_ITEM::SetItems( const EDA_ITEM* aItem, const EDA_ITEM* bItem,
{
m_ids.clear();
m_ids.push_back( aItem->m_Uuid );
if( aItem )
m_ids.push_back( aItem->m_Uuid );
if( bItem )
m_ids.push_back( bItem->m_Uuid );