check index in GetString()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
80bd086077
commit
17a6a662f7
@ -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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user