From 863136dea65adc3103b7c94272d0ed6e12346de0 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 10 Sep 2003 14:28:29 +0000 Subject: [PATCH 1/1] Test if G_threads already are initialized. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/app.cpp | 3 ++- src/gtk1/app.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index dad9249bc9..e58a9c8e97 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -584,7 +584,8 @@ bool wxApp::Initialize(int& argc, wxChar **argv) } else { - g_thread_init(NULL); + if (!g_thread_supported()) + g_thread_init(NULL); } #endif // wxUSE_THREADS diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index dad9249bc9..e58a9c8e97 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -584,7 +584,8 @@ bool wxApp::Initialize(int& argc, wxChar **argv) } else { - g_thread_init(NULL); + if (!g_thread_supported()) + g_thread_init(NULL); } #endif // wxUSE_THREADS -- 2.45.2