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:
parent
205a1ad98f
commit
803e2857b3
@ -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];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user