Fix crash from possible NULL pointer in wxQT list ctrl

Thanks @seandepagnier


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mariano Reingart
2015-01-19 03:02:23 +00:00
parent 0476cf3791
commit c8e56fa2cf

View File

@@ -783,12 +783,14 @@ long wxListCtrl::HitTest(const wxPoint& point, int &flags, long* ptrSubItem) con
if ( index.isValid() )
{
flags = wxLIST_HITTEST_ONITEM;
*ptrSubItem = index.column();
if (ptrSubItem)
*ptrSubItem = index.column();
}
else
{
flags = wxLIST_HITTEST_NOWHERE;
*ptrSubItem = 0;
if (ptrSubItem)
*ptrSubItem = 0;
}
return index.row();
}