diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-12-15 18:16:54 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-12-15 18:16:54 +0000 |
| commit | 1f029ed4422007ded20358683fa5b1cbf4d870da (patch) | |
| tree | a73d9bde15ebb41d6c7a24dc45e6cf9c34c84103 /src | |
| parent | 83afdbcfe5d36a64d945843396ddadd22ea4691b (diff) | |
Fix bad call to GetClientObject with no selection.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/wx_util.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 186e9c86b..b9a462801 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -155,7 +155,10 @@ checked_set (wxComboBox* widget, int value) void checked_set (wxComboBox* widget, string value) { - wxClientData* o = widget->GetClientObject (widget->GetSelection ()); + wxClientData* o = 0; + if (widget->GetSelection() != -1) { + o = widget->GetClientObject (widget->GetSelection ()); + } if (!o || string_client_data(o) != value) { for (unsigned int i = 0; i < widget->GetCount(); ++i) { |
