X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/19e30148e18cc99296b26503c155e5cef59045f4..53663be8a5ea8e1c6f178839209b67e8228e4642:/wxPython/src/msw/htmlhelp.py diff --git a/wxPython/src/msw/htmlhelp.py b/wxPython/src/msw/htmlhelp.py index fd3a642bac..33fdd1e5df 100644 --- a/wxPython/src/msw/htmlhelp.py +++ b/wxPython/src/msw/htmlhelp.py @@ -154,9 +154,12 @@ class wxHtmlHelpDataPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,htmlhelpc=htmlhelpc): - if self.thisown == 1 : - htmlhelpc.delete_wxHtmlHelpData(self) + def __del__(self, delfunc=htmlhelpc.delete_wxHtmlHelpData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTempDir(self, *_args, **_kwargs): val = apply(htmlhelpc.wxHtmlHelpData_SetTempDir,(self,) + _args, _kwargs) return val @@ -246,9 +249,12 @@ class wxHtmlHelpControllerPtr(wxEvtHandlerPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,htmlhelpc=htmlhelpc): - if self.thisown == 1 : - htmlhelpc.delete_wxHtmlHelpController(self) + def __del__(self, delfunc=htmlhelpc.delete_wxHtmlHelpController): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTitleFormat(self, *_args, **_kwargs): val = apply(htmlhelpc.wxHtmlHelpController_SetTitleFormat,(self,) + _args, _kwargs) return val