summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/kernel/qthread_unix.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp
index 59c51f4..a48468b 100644
--- a/src/kernel/qthread_unix.cpp
+++ b/src/kernel/qthread_unix.cpp
@@ -405,7 +405,11 @@ void QThread::start(Priority priority)
d->thread_id = NULL;
// Legacy glib versions require this threading system initialization call
- g_thread_init(NULL);
+ if (!GLIB_CHECK_VERSION (2, 32, 0)) {
+ if( ! g_thread_get_initialized () ) {
+ g_thread_init(NULL);
+ }
+ }
GThread* glib_thread_handle = g_thread_create((GThreadFunc)QThreadInstance::start, d->args, false, NULL);
if (glib_thread_handle) {