X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/25832b3f2bd566e5b68f066d97e0e79d2bbbd17f..45eb5249574b0f1f50db5e6a7eb5bba43fd99cb9:/wxPython/src/msw/misc.cpp?ds=sidebyside diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index 15e9210546..1c91992194 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -105,13 +105,13 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { dest = reg1.GetBox(); if (dest != wxRect(0,0,0,0)) { - bool doSave = wxPyRestoreThread(); + wxPyTState* state = wxPyBeginBlockThreads(); wxRect* newRect = new wxRect(dest); obj = wxPyConstructObject((void*)newRect, "wxRect"); PyObject* one = PyInt_FromLong(1); PyObject_SetAttrString(obj, "thisown", one); Py_DECREF(one); - wxPySaveThread(doSave); + wxPyEndBlockThreads(state); return obj; } Py_INCREF(Py_None);