X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a323d3bda70a87bdfe11c835617185dd8060724c..18d491685c8e13a5536f2f9dd6c8041c110a76d9:/wxPython/src/gtk/windows3.py?ds=sidebyside diff --git a/wxPython/src/gtk/windows3.py b/wxPython/src/gtk/windows3.py index 994e73cca0..c7a571f564 100644 --- a/wxPython/src/gtk/windows3.py +++ b/wxPython/src/gtk/windows3.py @@ -246,9 +246,12 @@ class wxLayoutAlgorithmPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,windows3c=windows3c): - if self.thisown == 1 : - windows3c.delete_wxLayoutAlgorithm(self) + def __del__(self, delfunc=windows3c.delete_wxLayoutAlgorithm): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def LayoutMDIFrame(self, *_args, **_kwargs): val = apply(windows3c.wxLayoutAlgorithm_LayoutMDIFrame,(self,) + _args, _kwargs) return val