From 098d1f0c65618e49a67f567f2736ca9b4ac3102c Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 22 Oct 2003 17:23:36 +0000 Subject: [PATCH] Save the initial tstate during initialization git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/helpers.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.45.2