diff --git a/eeschema/sim/spice_library_parser.cpp b/eeschema/sim/spice_library_parser.cpp index b1830ee40b..23c526e213 100644 --- a/eeschema/sim/spice_library_parser.cpp +++ b/eeschema/sim/spice_library_parser.cpp @@ -72,13 +72,12 @@ void SPICE_LIBRARY_PARSER::ReadFile( const std::string& aFilePath ) try { m_library.m_models.push_back( SIM_MODEL_SPICE::Create( m_library, node->string() ) ); + m_library.m_modelNames.emplace_back( node->children.at( 0 )->string() ); } catch( const IO_ERROR& e ) { DisplayErrorMessage( nullptr, e.What() ); } - - m_library.m_modelNames.emplace_back( node->children.at( 0 )->string() ); } else if( node->is_type() ) {