Add sanity check on the item number.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier 2010-02-03 05:22:13 +00:00
parent 205a1ad98f
commit 803e2857b3

View File

@ -94,6 +94,7 @@ int wxNSComboBoxControl::GetSelectedItem() const
void wxNSComboBoxControl::SetSelectedItem(int item)
{
wxASSERT_MSG(item >= 0 && item < [m_comboBox numberOfItems], "Inavlid item index.");
[m_comboBox selectItemAtIndex: item];
}