diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index 2dc4290167..cee26398b1 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -367,8 +367,11 @@ void BOARD::GetContextualTextVars( wxArrayString* aVars ) const GetTitleBlock().GetContextualTextVars( aVars ); - for( std::pair entry : GetProject()->GetTextVars() ) - add( entry.first ); + if( GetProject() ) + { + for( std::pair entry : GetProject()->GetTextVars() ) + add( entry.first ); + } }