DeletePendingObjects();
bool initialized = wxTopLevelWindows.GetCount() != 0;
-#ifdef __WXGTK__
- m_initialized = initialized;
-#endif
if (initialized) {
if ( m_exitOnFrameDelete == Later ) {
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
goto error;
}
-#ifdef __WXGTK__
- wxTheApp->m_initialized = (wxTopLevelWindows.GetCount() > 0);
-#endif
-
Py_DECREF(result);
Py_DECREF(pyint);
Py_INCREF(Py_None);