don't assert if 'c' key is pressed when there is no selection

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-11-12 22:33:21 +00:00
parent 4683dc1c43
commit 63c95fafea

View File

@ -915,6 +915,12 @@ void MyListCtrl::OnListKeyDown(wxListEvent& event)
{
wxListItem info;
info.m_itemId = event.GetIndex();
if ( info.m_itemId == -1 )
{
// no item
break;
}
GetItem(info);
wxListItemAttr *attr = info.GetAttributes();