X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b9ac87bc5cbe46227195e32c44e25831f8206e3c..b67a93277892e8226d8e59162a14564f661843f6:/wxPython/src/gtk/image.py?ds=sidebyside diff --git a/wxPython/src/gtk/image.py b/wxPython/src/gtk/image.py index 51a559ae51..d19383f178 100644 --- a/wxPython/src/gtk/image.py +++ b/wxPython/src/gtk/image.py @@ -192,9 +192,12 @@ class wxImagePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,imagec=imagec): - if self.thisown == 1 : - imagec.delete_wxImage(self) + def __del__(self, delfunc=imagec.delete_wxImage): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Create(self, *_args, **_kwargs): val = apply(imagec.wxImage_Create,(self,) + _args, _kwargs) return val @@ -271,6 +274,9 @@ class wxImagePtr(wxObjectPtr): def GetData(self, *_args, **_kwargs): val = apply(imagec.wxImage_GetData,(self,) + _args, _kwargs) return val + def SetDataBuffer(self, *_args, **_kwargs): + val = apply(imagec.wxImage_SetDataBuffer,(self,) + _args, _kwargs) + return val def SetData(self, *_args, **_kwargs): val = apply(imagec.wxImage_SetData,(self,) + _args, _kwargs) return val