diff --git a/eeschema/sim/simulator_frame_ui.cpp b/eeschema/sim/simulator_frame_ui.cpp index c05f5e53ae..2a5077490c 100644 --- a/eeschema/sim/simulator_frame_ui.cpp +++ b/eeschema/sim/simulator_frame_ui.cpp @@ -899,9 +899,8 @@ void SIMULATOR_FRAME_UI::rebuildSignalsList() if( !name.StartsWith( "V" ) ) continue; - const SIM_MODEL::PARAM* portNum = item.model->FindParam( "portnum" ); - std::string portnum = ""; + if( const SIM_MODEL::PARAM* portnum_param = item.model->FindParam( "portnum" ) ) portnum = SIM_VALUE::ToSpice( portnum_param->value );