X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7ea515abfb0211078d9ffcd4420ef0b53f3fcabe..360be3c012c0641999ed55247a3b62ab830008c4:/wxPython/src/helpers.cpp diff --git a/wxPython/src/helpers.cpp b/wxPython/src/helpers.cpp index e71d858d5b..18a46a2f83 100644 --- a/wxPython/src/helpers.cpp +++ b/wxPython/src/helpers.cpp @@ -362,6 +362,10 @@ void __wxPreStart(PyObject* moduleDict) PyEval_InitThreads(); wxPyTStates = new wxPyThreadStateArray; wxPyTMutex = new wxMutex; + + // Save the current (main) thread state in our array + PyThreadState* tstate = wxPyBeginAllowThreads(); + wxPyEndAllowThreads(tstate); #endif // Ensure that the build options in the DLL (or whatever) match this build