X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f0bc6afbbd36e1f75ef22bedb9cb2e3abc2b7b64..cdef03346586b83cb87ed1e9d239f236ce8baaf7:/src/generic/treectlg.cpp diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index c6d79cde38..fd499ea6fe 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -199,9 +199,9 @@ public: wxGenericTreeItem *GetParent() const { return m_parent; } // operations - // deletes all children notifying the treectrl about it if !NULL - // pointer given - void DeleteChildren(wxGenericTreeCtrl *tree = NULL); + + // deletes all children notifying the treectrl about it + void DeleteChildren(wxGenericTreeCtrl *tree); // get count of all children (and grand children if 'recursively') size_t GetChildrenCount(bool recursively = true) const; @@ -548,11 +548,10 @@ void wxGenericTreeItem::DeleteChildren(wxGenericTreeCtrl *tree) for ( size_t n = 0; n < count; n++ ) { wxGenericTreeItem *child = m_children[n]; - if (tree) - tree->SendDeleteEvent(child); + tree->SendDeleteEvent(child); child->DeleteChildren(tree); - if (child == tree->m_select_me) + if ( child == tree->m_select_me ) tree->m_select_me = NULL; delete child; }