Make sure default board thickness exists

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16733
This commit is contained in:
Jon Evans 2024-01-24 23:09:38 -05:00
parent c816280c6d
commit 3ef16221fe
1 changed files with 5 additions and 0 deletions

View File

@ -2018,6 +2018,11 @@ void PCB_IO_KICAD_SEXPR_PARSER::parseSetup()
// not the default value (0.25mm) // not the default value (0.25mm)
bds.m_SolderMaskMinWidth = 0; bds.m_SolderMaskMinWidth = 0;
// Set up a default stackup in case the file doesn't define one
BOARD_STACKUP& stackup = bds.GetStackupDescriptor();
stackup.RemoveAll();
stackup.BuildDefaultStackupList( &bds, m_board->GetCopperLayerCount() );
for( T token = NextTok(); token != T_RIGHT; token = NextTok() ) for( T token = NextTok(); token != T_RIGHT; token = NextTok() )
{ {
if( token != T_LEFT ) if( token != T_LEFT )