diff --git a/eeschema/dialogs/dialog_sim_command.cpp b/eeschema/dialogs/dialog_sim_command.cpp index 98788262a6..ba1ef9b19c 100644 --- a/eeschema/dialogs/dialog_sim_command.cpp +++ b/eeschema/dialogs/dialog_sim_command.cpp @@ -570,7 +570,7 @@ void DIALOG_SIM_COMMAND::updateDCSources( wxChar aType, wxChoice* aSource ) { wxString prevSelection; - if( !aSource->IsEmpty() ) + if( !aSource->IsEmpty() && aSource->GetSelection() >= 0 ) prevSelection = aSource->GetString( aSource->GetSelection() ); std::set sourcesList;