Modified treectrlg.cpp not to crash in HitTest if there's no m_anchor

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-12-21 16:12:43 +00:00
parent 0fff366e0f
commit c3c979c7b8

View File

@@ -2218,7 +2218,10 @@ wxTreeItemId wxGenericTreeCtrl::HitTest(const wxPoint& point, int& flags)
if (point.y<0) flags|=wxTREE_HITTEST_ABOVE;
if (point.y>h) flags|=wxTREE_HITTEST_BELOW;
return m_anchor->HitTest( wxPoint(x, y), this, flags);
if (m_anchor)
return m_anchor->HitTest( wxPoint(x, y), this, flags);
else
return wxTreeItemId();
}
// get the bounding rectangle of the item (or of its label only)