diff --git a/wxPython/wx/lib/customtreectrl.py b/wxPython/wx/lib/customtreectrl.py index 817fa01b54..e5fb6e4682 100644 --- a/wxPython/wx/lib/customtreectrl.py +++ b/wxPython/wx/lib/customtreectrl.py @@ -3562,7 +3562,8 @@ class CustomTreeCtrl(wx.PyScrolledWindow): for child in self._itemWithWindow: if not self.IsVisible(child): wnd = child.GetWindow() - wnd.Hide() + if wnd: + wnd.Hide() def Unselect(self):