Fix glib multithreading abort with versions less than 2.24

This resolves Bug 1581
pull/2/head
Francois Andriot 11 years ago committed by Timothy Pearson
parent c0c848cf2a
commit 32bd03533d

@ -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) {

Loading…
Cancel
Save