X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d5d57f3ec5641b9843ae6f2e02d3ad5093a49e6..53663be8a5ea8e1c6f178839209b67e8228e4642:/wxPython/src/msw/printfw.py diff --git a/wxPython/src/msw/printfw.py b/wxPython/src/msw/printfw.py index 1800f47407..ba11c95428 100644 --- a/wxPython/src/msw/printfw.py +++ b/wxPython/src/msw/printfw.py @@ -25,9 +25,12 @@ class wxPrintDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,printfwc=printfwc): - if self.thisown == 1 : - printfwc.delete_wxPrintData(self) + def __del__(self, delfunc=printfwc.delete_wxPrintData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetNoCopies(self, *_args, **_kwargs): val = apply(printfwc.wxPrintData_GetNoCopies,(self,) + _args, _kwargs) return val @@ -206,9 +209,12 @@ class wxPageSetupDialogDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,printfwc=printfwc): - if self.thisown == 1 : - printfwc.delete_wxPageSetupDialogData(self) + def __del__(self, delfunc=printfwc.delete_wxPageSetupDialogData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def EnableHelp(self, *_args, **_kwargs): val = apply(printfwc.wxPageSetupDialogData_EnableHelp,(self,) + _args, _kwargs) return val @@ -338,9 +344,12 @@ class wxPrintDialogDataPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,printfwc=printfwc): - if self.thisown == 1 : - printfwc.delete_wxPrintDialogData(self) + def __del__(self, delfunc=printfwc.delete_wxPrintDialogData): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def EnableHelp(self, *_args, **_kwargs): val = apply(printfwc.wxPrintDialogData_EnableHelp,(self,) + _args, _kwargs) return val @@ -510,9 +519,12 @@ class wxPrinterPtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,printfwc=printfwc): - if self.thisown == 1 : - printfwc.delete_wxPrinter(self) + def __del__(self, delfunc=printfwc.delete_wxPrinter): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def CreateAbortWindow(self, *_args, **_kwargs): val = apply(printfwc.wxPrinter_CreateAbortWindow,(self,) + _args, _kwargs) return val