diff --git a/eeschema/sim/sim_model.cpp b/eeschema/sim/sim_model.cpp index 2cac0fa945..9b5bff6d8a 100644 --- a/eeschema/sim/sim_model.cpp +++ b/eeschema/sim/sim_model.cpp @@ -1590,13 +1590,16 @@ void SIM_MODEL::InferredReadDataFields( unsigned aSymbolPinCount, const std::vec } catch( const IO_ERROR& e ) { - if( aAllowOnlyFirstValue ) - SetParamValue( 0, parseFieldFloatValue( valueField ) ); - else - throw e; + if( GetParamCount() >= 1 ) + { + if( aAllowOnlyFirstValue ) + SetParamValue( 0, parseFieldFloatValue( valueField ) ); + else + throw e; + } } } - else if( aAllowOnlyFirstValue ) + else if( GetParamCount() >= 1 && aAllowOnlyFirstValue ) { // This is reached only when model allows only the first value. SetParamValue( 0, parseFieldFloatValue( valueField ) );