Null pointer check in FOOTPRINT_LIST::GetInstance()

This commit is contained in:
Tomasz Włostowski 2018-10-12 23:51:31 +02:00
parent e988cd9c25
commit 22300e4f02
1 changed files with 3 additions and 0 deletions

View File

@ -138,6 +138,9 @@ FOOTPRINT_LIST* FOOTPRINT_LIST::GetInstance( KIWAY& aKiway )
{
FOOTPRINT_LIST* footprintInfo = get_instance_from_id( aKiway, KIFACE_FOOTPRINT_LIST );
if( ! footprintInfo )
return nullptr;
if( !footprintInfo->GetCount() )
{
wxTextFile footprintInfoCache( aKiway.Prj().GetProjectPath() + "fp-info-cache" );