diff --git a/pcbnew/board.cpp b/pcbnew/board.cpp index 75f9dd00cb..411bc40070 100644 --- a/pcbnew/board.cpp +++ b/pcbnew/board.cpp @@ -365,8 +365,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 ); + } }