Prevent nullptr dereference.

Fixes https://gitlab.com/kicad/code/kicad/issues/12516
This commit is contained in:
Jeff Young 2022-11-28 13:38:26 +00:00
parent eb19e32b40
commit 9a25464337
1 changed files with 4 additions and 1 deletions

View File

@ -708,7 +708,10 @@ void SCH_EDIT_FRAME::HardRedraw()
item->ClearCaches();
for( std::pair<const wxString, LIB_SYMBOL*>& libSymbol : screen->GetLibSymbols() )
libSymbol.second->ClearCaches();
{
if( libSymbol.second )
libSymbol.second->ClearCaches();
}
RecalculateConnections( LOCAL_CLEANUP );