Null-ptr safety.

Fixes https://gitlab.com/kicad/code/kicad/issues/7266
This commit is contained in:
Jeff Young 2021-02-02 23:09:17 +00:00
parent 8464add58c
commit 1c6c0bf8cf
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ void SCH_SCREEN::Append( SCH_ITEM* aItem )
{
auto it = m_libSymbols.find( symbol->GetSchSymbolLibraryName() );
if( it == m_libSymbols.end() )
if( it == m_libSymbols.end() || !it->second )
{
m_libSymbols[symbol->GetSchSymbolLibraryName()] =
new LIB_PART( *symbol->GetPartRef() );