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:
@@ -915,6 +915,12 @@ void MyListCtrl::OnListKeyDown(wxListEvent& event)
|
|||||||
{
|
{
|
||||||
wxListItem info;
|
wxListItem info;
|
||||||
info.m_itemId = event.GetIndex();
|
info.m_itemId = event.GetIndex();
|
||||||
|
if ( info.m_itemId == -1 )
|
||||||
|
{
|
||||||
|
// no item
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
GetItem(info);
|
GetItem(info);
|
||||||
|
|
||||||
wxListItemAttr *attr = info.GetAttributes();
|
wxListItemAttr *attr = info.GetAttributes();
|
||||||
|
Reference in New Issue
Block a user