X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c370783e915cbf999619624ee6a082e99b028981..976f924083419b6a7feb1ff7d597c746a70abf1a:/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp?ds=sidebyside diff --git a/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp b/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp index a19ffa4097..ca5922e8eb 100644 --- a/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp @@ -790,11 +790,12 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons } 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); @@ -804,7 +805,7 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons Py_DECREF(o3); } return target; -} + } PyObject *wxPyTreeListCtrl_GetBoundingRect(wxPyTreeListCtrl *self,wxTreeItemId const &item,bool textOnly){