]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/helpers.cpp
Always set background colour prior to any HTML rendering (this fixes assert in GTK2...
[wxWidgets.git] / wxPython / src / helpers.cpp
index e71d858d5b7ccd75a638fc762a66642c39d45d53..18a46a2f830af07ad3eb66cd122fe8c980a7fe9b 100644 (file)
@@ -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