summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancois Andriot <albator78@libertysurf.fr>2013-07-23 08:53:00 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-23 08:53:00 -0500
commit32bd03533db933819ecd973a514160f9bb818df9 (patch)
tree1de574b0f88e8c12d77ff6677153966af3f5fe16 /src
parentc0c848cf2a17783a8fbace06ad300bb997f4b9e9 (diff)
downloadqt3-32bd03533db933819ecd973a514160f9bb818df9.tar.gz
qt3-32bd03533db933819ecd973a514160f9bb818df9.zip
Fix glib multithreading abort with versions less than 2.24
This resolves Bug 1581
Diffstat (limited to 'src')
-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) {