Fix a SPICE simulator crash on run of a second OP command.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16341
This commit is contained in:
Wayne Stambaugh 2023-12-18 09:43:40 -05:00
parent 9e1ceba5d8
commit fd91f8933e
1 changed files with 3 additions and 0 deletions

View File

@ -2776,6 +2776,9 @@ void SIMULATOR_FRAME_UI::OnSimRefresh( bool aFinal )
for( const std::string& vec : simulator()->AllVectors() )
{
std::vector<double> val_list = simulator()->GetRealVector( vec, 1 );
wxCHECK2( !val_list.empty(), continue );
wxString value = SPICE_VALUE( val_list[ 0 ] ).ToSpiceString();
wxString signal;
SIM_TRACE_TYPE type = circuitModel()->VectorToSignal( vec, signal );