diff --git a/utils/kicad2step/pcb/kicadpcb.cpp b/utils/kicad2step/pcb/kicadpcb.cpp index 4796d54e10..7cb6822ef3 100644 --- a/utils/kicad2step/pcb/kicadpcb.cpp +++ b/utils/kicad2step/pcb/kicadpcb.cpp @@ -323,9 +323,14 @@ bool KICADPCB::parseLayers( SEXPR::SEXPR* data ) wxLogMessage( "%s\n", ostr.str().c_str() ); return false; } + std::string ref; - m_layersNames[child->GetChild( 1 )->GetSymbol()] = - child->GetChild( 0 )->GetInteger(); + if( child->GetChild( 1 )->IsSymbol() ) + ref = child->GetChild( 1 )->GetSymbol(); + else + ref = child->GetChild( 1 )->GetString(); + + m_layersNames[ref] = child->GetChild( 0 )->GetInteger(); } return true;