From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Tue, 25 Dec 2001 22:31:13 +0000 (+0000)
Subject: fixed crash when an item didn't have any data
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8b4a9377b0af45636390cf201fa4efbb3046e143

fixed crash when an item didn't have any data


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h
index b99a97724a..a923425377 100644
--- a/include/wx/msw/treectrl.h
+++ b/include/wx/msw/treectrl.h
@@ -439,7 +439,7 @@ private:
                              class wxTreeItemIndirectData *data);
     bool HasIndirectData(const wxTreeItemId& item) const;
     bool IsDataIndirect(wxTreeItemData *data) const
-        { return data->GetId().m_pItem == 0; }
+        { return data && data->GetId().m_pItem == 0; }
 
     // the hash storing the items attributes (indexed by items ids)
     wxHashTable m_attrs;