]> git.saurik.com Git - wxWidgets.git/commitdiff
Blind fix to avoid a PyDeadObject error
authorRobin Dunn <robin@alldunn.com>
Fri, 16 Jul 2004 20:35:10 +0000 (20:35 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 16 Jul 2004 20:35:10 +0000 (20:35 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/mixins/listctrl.py

index ddbb8b46a073274056d67568e5c046d8e79dbe22..fa9bd0291d555dcafaddc47c6483be3b80924cf8 100644 (file)
@@ -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.