From 58a6eb653b108753a44988bfbbaf231fa9a47760 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 12 Oct 2023 14:56:56 +0200 Subject: [PATCH] protect protect RC_ITEM::SetItems() against null pointer. Fixes #15865 https://gitlab.com/kicad/code/kicad/-/issues/15865 --- common/rc_item.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/rc_item.cpp b/common/rc_item.cpp index acce081d4f..324228db24 100644 --- a/common/rc_item.cpp +++ b/common/rc_item.cpp @@ -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 );