diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 31acadfa5e..92c8fe6010 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -449,9 +449,9 @@ public: else return NULL; } - } // The OOR typemaps don't know what to do with the %new, so fix it up. + } // The OOR typemaps don't know what to do with the %new, so fix it up. %pragma(python) addtoclass = " - def GetItem(self, *_args, **_kwargs): + def GetColumn(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs) if val is not None: val.thisown = 1 return val @@ -492,7 +492,7 @@ public: %pragma(python) addtoclass = " def GetItem(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs) - val.thisown = 1 + if val is not None: val.thisown = 1 return val " diff --git a/wxPython/src/msw/controls2.py b/wxPython/src/msw/controls2.py index 4e0d8638e8..fe8aade9d1 100644 --- a/wxPython/src/msw/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -637,7 +637,7 @@ class wxListCtrlPtr(wxControlPtr): def __repr__(self): return "" % (self.this,) - def GetItem(self, *_args, **_kwargs): + def GetColumn(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs) if val is not None: val.thisown = 1 return val @@ -645,7 +645,7 @@ class wxListCtrlPtr(wxControlPtr): def GetItem(self, *_args, **_kwargs): val = apply(controls2c.wxListCtrl_GetItem,(self,) + _args, _kwargs) - val.thisown = 1 + if val is not None: val.thisown = 1 return val