git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52747
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// returns true if key was consumed
bool wxVListBoxComboPopup::HandleKey( int keycode, bool saturate, wxChar unicode )
{
+ const int itemCount = GetCount();
+
+ // keys do nothing in the empty control and returning immediately avoids
+ // using invalid indices below
+ if ( !itemCount )
+ return false;
+
int value = m_value;
- int itemCount = GetCount();
int comboStyle = m_combo->GetWindowStyle();
// this is the character equivalent of the code