EasyEDA Std PCB: fix crash when Name/Prefix type text is not in a footprint.

This commit is contained in:
Alex Shvartzkop 2024-03-04 15:04:02 +03:00
parent f9ad0a434d
commit 951c550c1e
1 changed files with 2 additions and 2 deletions

View File

@ -790,11 +790,11 @@ void PCB_IO_EASYEDA_PARSER::ParseToBoardItemContainer(
wxString textType = arr[1];
bool add = false;
if( textType == wxS( "P" ) )
if( footprint && textType == wxS( "P" ) )
{
text = footprint->GetField( REFERENCE_FIELD );
}
else if( textType == wxS( "N" ) )
else if( footprint && textType == wxS( "N" ) )
{
text = footprint->GetField( VALUE_FIELD );
}