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:
parent
4683dc1c43
commit
63c95fafea
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user