X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5841276a802f0fc29a260fd4dde6710e450e1b0c..91a40e94b9efe799e401638edf84e75d3285d11b:/wxPython/wx/lib/mixins/listctrl.py 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.