From a61c65b304b7816844dfb71228144388274e1628 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 16 Jul 2004 20:35:10 +0000 Subject: [PATCH 1/1] Blind fix to avoid a PyDeadObject error git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wx/lib/mixins/listctrl.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wxPython/wx/lib/mixins/listctrl.py b/wxPython/wx/lib/mixins/listctrl.py index ddbb8b46a0..fa9bd0291d 100644 --- a/wxPython/wx/lib/mixins/listctrl.py +++ b/wxPython/wx/lib/mixins/listctrl.py @@ -216,6 +216,10 @@ class ListCtrlAutoWidthMixin: or calculated a minimum width. This ensure that repeated calls to _doResize() don't cause the last column to size itself too large. """ + + if not self: # avoid a PyDeadObject error + return + numCols = self.GetColumnCount() if numCols == 0: return # Nothing to resize. -- 2.45.2