dialog_sim_settings: don't try to read current wxChoice selection if no choices.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7823
This commit is contained in:
parent
274d4e2eb4
commit
5b70508624
|
@ -299,7 +299,8 @@ int DIALOG_SIM_SETTINGS::ShowModal()
|
||||||
|
|
||||||
void DIALOG_SIM_SETTINGS::updateDCSources( wxChar aType, wxChoice* aSource )
|
void DIALOG_SIM_SETTINGS::updateDCSources( wxChar aType, wxChoice* aSource )
|
||||||
{
|
{
|
||||||
wxString prevSelection = aSource->GetString( aSource->GetSelection() );
|
wxString prevSelection = aSource->GetCount() ?
|
||||||
|
aSource->GetString( aSource->GetSelection() ) : wxEmptyString;
|
||||||
std::vector<wxString> sourcesList;
|
std::vector<wxString> sourcesList;
|
||||||
bool enableSrcSelection = true;
|
bool enableSrcSelection = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue