X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6e7db3c845d81413b3097a9a16738b877340c282..3cebfef17b54f9dacc386f090827b8badb2773d2:/wxPython/src/_listctrl.i diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index afb29a1ea2..d95360d13a 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -341,7 +341,7 @@ EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED static int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) { int retval = 0; PyObject* func = (PyObject*)funcPtr; - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); PyObject* args = Py_BuildValue("(ii)", item1, item2); PyObject* result = PyEval_CallObject(func, args); @@ -351,7 +351,7 @@ EVT_LIST_ITEM_FOCUSED = wx.PyEventBinder(wxEVT_COMMAND_LIST_ITEM_FOCUSED Py_DECREF(result); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return retval; } %}