]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/app.cpp
made wxApp::GetTopWindow() virtual
[wxWidgets.git] / src / gtk / app.cpp
index e7345fe6a9686827ca2f14b5a5709df00ec0a207..e29797d061470572dbe7d4d4f45f64411b7754dd 100644 (file)
@@ -82,6 +82,14 @@ void wxExit()
 
 bool wxYield()
 {
+#if wxUSE_THREADS
+    if ( !wxThread::IsMain() )
+    {
+        // can't call gtk_main_iteration() from other threads like this
+        return TRUE;
+    }
+#endif // wxUSE_THREADS
+
 #ifdef __WXDEBUG__
     static bool s_inYield = FALSE;