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:
Vadim Zeitlin
2008-03-23 20:20:46 +00:00
parent 3bf1d42654
commit a954b0dd20

View File

@@ -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