X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68bc8549d81adc1b6f031bdbb03b91a71944197c..b0abe9eeec1e08f5e236d209428e521debb6544e:/wxPython/contrib/ogl/oglshapes.py diff --git a/wxPython/contrib/ogl/oglshapes.py b/wxPython/contrib/ogl/oglshapes.py index 9f6d7e260f..4090867d08 100644 --- a/wxPython/contrib/ogl/oglshapes.py +++ b/wxPython/contrib/ogl/oglshapes.py @@ -49,18 +49,15 @@ class wxPseudoMetaFilePtr(wxObjectPtr): def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,oglshapesc=oglshapesc): - if self.thisown == 1 : - oglshapesc.delete_wxPseudoMetaFile(self) + def __del__(self, delfunc=oglshapesc.delete_wxPseudoMetaFile): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def Draw(self, *_args, **_kwargs): val = apply(oglshapesc.wxPseudoMetaFile_Draw,(self,) + _args, _kwargs) return val - def WriteAttributes(self, *_args, **_kwargs): - val = apply(oglshapesc.wxPseudoMetaFile_WriteAttributes,(self,) + _args, _kwargs) - return val - def ReadAttributes(self, *_args, **_kwargs): - val = apply(oglshapesc.wxPseudoMetaFile_ReadAttributes,(self,) + _args, _kwargs) - return val def Clear(self, *_args, **_kwargs): val = apply(oglshapesc.wxPseudoMetaFile_Clear,(self,) + _args, _kwargs) return val