X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5fe384748c8bcb7752a0613a81e1273aeadc22c5..720e01c312b9a7ee493d649656bcc875eaf5acb6:/src/mac/choice.cpp diff --git a/src/mac/choice.cpp b/src/mac/choice.cpp index fdd9b43da6..2275ce10c0 100644 --- a/src/mac/choice.cpp +++ b/src/mac/choice.cpp @@ -46,6 +46,9 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, const wxValidator& validator, const wxString& name) { + if ( !wxChoiceBase::Create(parent, id, pos, size, style, validator, name) ) + return false; + Rect bounds ; Str255 title ; @@ -177,8 +180,12 @@ void wxChoice::SetString(int n, const wxString& s) wxString wxChoice::GetString(int n) const { + wxCHECK_MSG( n >= 0 && (size_t)n < m_strings.GetCount(), _T(""), + _T("wxChoice::GetString(): invalid index") ); + return m_strings[n] ; } + // ---------------------------------------------------------------------------- // client data // ----------------------------------------------------------------------------