X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5fe384748c8bcb7752a0613a81e1273aeadc22c5..99e8cb505ad94704ec6596d20842ca8fa34e7d9e:/src/mac/carbon/choice.cpp diff --git a/src/mac/carbon/choice.cpp b/src/mac/carbon/choice.cpp index fdd9b43da6..c187d9ecc7 100644 --- a/src/mac/carbon/choice.cpp +++ b/src/mac/carbon/choice.cpp @@ -177,8 +177,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 // ----------------------------------------------------------------------------