Don't push a model that didn't load.

Fixes https://gitlab.com/kicad/code/kicad/issues/12689
This commit is contained in:
Jeff Young 2022-12-04 19:05:16 +00:00
parent 672927e183
commit f29f0c5c0a
1 changed files with 1 additions and 2 deletions

View File

@ -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<SIM_LIBRARY_SPICE_PARSER::unknownLine>() )
{