#ifdef __WXMOTIF__
#define wxPlatform "__WXMOTIF__"
#endif
-#ifdef __WXQT__
-#define wxPlatform "__WXQT__"
+#ifdef __WXX11__
+#define wxPlatform "__WXX11__"
#endif
#ifdef __WXGTK__
#define wxPlatform "__WXGTK__"
return wxThread::GetCurrentId();
}
-
+static PyThreadState* gs_shutdownTState;
static
PyThreadState* wxPyGetThreadState() {
+ if (wxPyTMutex == NULL) // Python is shutting down...
+ return gs_shutdownTState;
+
unsigned long ctid = wxPyGetCurrentThreadId();
PyThreadState* tstate = NULL;
static
void wxPySaveThreadState(PyThreadState* tstate) {
+ if (wxPyTMutex == NULL) { // Python is shutting down, assume a single thread...
+ gs_shutdownTState = tstate;
+ return;
+ }
unsigned long ctid = wxPyGetCurrentThreadId();
wxPyTMutex->Lock();
for(size_t i=0; i < wxPyTStates->GetCount(); i++) {