]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/helpers.cpp
reSWIGged
[wxWidgets.git] / wxPython / src / helpers.cpp
index 96bed66402b31c42c768dfce589867c2762152a7..a1a20b66fa7113e7549e295c15205ce3c4559cec 100644 (file)
@@ -442,7 +442,7 @@ void wxPyApp::_BootstrapApp()
         setlocale(LC_NUMERIC, "C");
 #endif
 
-        wxSystemOptions::SetOption(wxT("mac.textcontrol-use-mlte"), 1);
+//        wxSystemOptions::SetOption(wxT("mac.textcontrol-use-mlte"), 1);
         
         // The stock objects were all NULL when they were loaded into
         // SWIG generated proxies, so re-init those now...
@@ -1167,6 +1167,9 @@ void wxPyEndAllowThreads(PyThreadState* saved) {
 
 wxPyBlock_t wxPyBeginBlockThreads() {
 #ifdef WXP_WITH_THREAD
+    if (! Py_IsInitialized()) {
+        return (wxPyBlock_t)0;
+    }
 #if wxPyUSE_GIL_STATE
     PyGILState_STATE state = PyGILState_Ensure();
     return state;
@@ -1192,6 +1195,9 @@ wxPyBlock_t wxPyBeginBlockThreads() {
 
 void wxPyEndBlockThreads(wxPyBlock_t blocked) {
 #ifdef WXP_WITH_THREAD
+    if (! Py_IsInitialized()) {
+        return;
+    }            
 #if wxPyUSE_GIL_STATE
     PyGILState_Release(blocked);
 #else