]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/choice.cpp
ugly fix for warnings when wxUSE_STL==0 not breaking compilation when wxUSE_STL==1
[wxWidgets.git] / src / mac / choice.cpp
index fdd9b43da6c49ac2135d59a0441b2b6d265cc6be..c187d9ecc75ef2f05485fc205c175616a5ef0bed 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------