diff --git a/eeschema/dialogs/dialog_sim_settings.cpp b/eeschema/dialogs/dialog_sim_settings.cpp index 6e8b7a4c7b..517290bad4 100644 --- a/eeschema/dialogs/dialog_sim_settings.cpp +++ b/eeschema/dialogs/dialog_sim_settings.cpp @@ -392,8 +392,8 @@ void DIALOG_SIM_SETTINGS::updateDCSources( wxChar aType, wxChoice* aSource ) { wxString prevSelection; - if( aSource->GetCount() ) - aSource->GetString( aSource->GetSelection() ); + if( !aSource->IsEmpty() ) + prevSelection = aSource->GetString( aSource->GetSelection() ); std::vector sourcesList; bool enableSrcSelection = true;