X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/25832b3f2bd566e5b68f066d97e0e79d2bbbd17f..4649b5eded522cdc6d76aae074f98a2c162fd648:/wxPython/src/msw/misc.cpp 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);