X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96d37ab54733776a855ee3aadaf35aee087d14c0..9176f38f730c3415ac7a911c2f85cdea7eca4478:/wxPython/src/_display.i?ds=sidebyside diff --git a/wxPython/src/_display.i b/wxPython/src/_display.i index 04ad845301..433e5762cb 100644 --- a/wxPython/src/_display.i +++ b/wxPython/src/_display.i @@ -163,14 +163,14 @@ platform."); PyObject* GetModes(const wxVideoMode& mode = wxDefaultVideoMode) { PyObject* pyList = NULL; wxArrayVideoModes arr = self->GetModes(mode); - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); pyList = PyList_New(0); for (int i=0; i < arr.GetCount(); i++) { wxVideoMode* m = new wxVideoMode(arr.Item(i)); PyObject* pyObj = wxPyConstructObject(m, wxT("wxVideoMode"), true); PyList_Append(pyList, pyObj); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return pyList; } }