Don't push a model that didn't load.
Fixes https://gitlab.com/kicad/code/kicad/issues/12689
This commit is contained in:
parent
672927e183
commit
f29f0c5c0a
|
@ -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>() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue