diff --git a/pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr_parser.cpp b/pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr_parser.cpp index f7dccbf259..f4299b71ba 100644 --- a/pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr_parser.cpp +++ b/pcbnew/pcb_io/kicad_sexpr/pcb_io_kicad_sexpr_parser.cpp @@ -2018,6 +2018,11 @@ void PCB_IO_KICAD_SEXPR_PARSER::parseSetup() // not the default value (0.25mm) 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() ) { if( token != T_LEFT )