]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
fixed KDE link file reading code
[wxWidgets.git] / src / generic / treectlg.cpp
index cb0a92a6153782da785d1bbe3dba0dbc5ca80df2..6a24217b124c2839cf7b5966647188d9c70de350 100644 (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)