fixed possible segmentation in physical printer dialog

* When pressing "Refresh Printers" in Physical Printer Dialog slicer
  crashed because of a wrong cast
This commit is contained in:
Martin Loidl 2020-11-14 21:46:54 +01:00
parent cd2b502c38
commit c5391d3354

View File

@ -1074,7 +1074,7 @@ void Choice::set_values(const wxArrayString &values)
// # it looks that Clear() also clears the text field in recent wxWidgets versions,
// # but we want to preserve it
auto ww = dynamic_cast<wxBitmapComboBox*>(window);
auto ww = dynamic_cast<choice_ctrl*>(window);
auto value = ww->GetValue();
ww->Clear();
ww->Append("");