X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c370783e915cbf999619624ee6a082e99b028981..a3f4cbd6c8bf939765639251a82308f40f7f5514:/wxPython/src/mac/grid_wrap.cpp diff --git a/wxPython/src/mac/grid_wrap.cpp b/wxPython/src/mac/grid_wrap.cpp index 9053d750fe..3c38f5bba3 100644 --- a/wxPython/src/mac/grid_wrap.cpp +++ b/wxPython/src/mac/grid_wrap.cpp @@ -1203,11 +1203,12 @@ void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){ } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { - o2 = target; - target = PyTuple_New(1); - PyTuple_SetItem(target, 0, o2); - + } else { + if (!PyTuple_Check(target)) { + o2 = target; + target = PyTuple_New(1); + PyTuple_SetItem(target, 0, o2); + } o3 = PyTuple_New(1); PyTuple_SetItem(o3, 0, o); @@ -1217,7 +1218,7 @@ void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){ Py_DECREF(o3); } return target; -} + } void wxGridCellAttrProvider__setOORInfo(wxGridCellAttrProvider *self,PyObject *_self){