X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c32bde282cd479da5b09d5ffbb6f2e3558d66549..6028be3f39babc4530472a4139576fe318c6aa90:/wxPython/src/msw/_gdi_wrap.cpp diff --git a/wxPython/src/msw/_gdi_wrap.cpp b/wxPython/src/msw/_gdi_wrap.cpp index e3c13b0177..5c92db055a 100644 --- a/wxPython/src/msw/_gdi_wrap.cpp +++ b/wxPython/src/msw/_gdi_wrap.cpp @@ -621,11 +621,12 @@ SWIG_Check_int(PyObject* obj) } 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); @@ -635,7 +636,7 @@ SWIG_Check_int(PyObject* obj) Py_DECREF(o3); } return target; -} + } PyObject *wxPen_GetDashes(wxPen *self){