fix crash when pressing Up key in empty combobox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -246,8 +246,14 @@ void wxVListBoxComboPopup::SendComboBoxEvent( int selection )
|
||||
// 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
|
||||
|
Reference in New Issue
Block a user