A BOARD may not always have a project

For example, if it's the footprint editor model

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15283
This commit is contained in:
Jon Evans 2023-08-01 17:19:13 -04:00
parent 37fdcce0a0
commit 2459949d0d
1 changed files with 5 additions and 2 deletions

View File

@ -365,9 +365,12 @@ void BOARD::GetContextualTextVars( wxArrayString* aVars ) const
GetTitleBlock().GetContextualTextVars( aVars );
if( GetProject() )
{
for( std::pair<wxString, wxString> entry : GetProject()->GetTextVars() )
add( entry.first );
}
}
bool BOARD::ResolveTextVar( wxString* token, int aDepth ) const