diff options
author | Francois Andriot <albator78@libertysurf.fr> | 2013-07-23 08:53:00 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-07-23 08:53:00 -0500 |
commit | 32bd03533db933819ecd973a514160f9bb818df9 (patch) | |
tree | 1de574b0f88e8c12d77ff6677153966af3f5fe16 /src | |
parent | c0c848cf2a17783a8fbace06ad300bb997f4b9e9 (diff) | |
download | qt3-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.cpp | 6 |
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) { |