From c2b22bd61550bb03db223dd9bab9b8abb6fed277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Fri, 2 Nov 2018 00:00:00 +0000 Subject: [PATCH] gthread: Synchronize access to g_once_init_list --- glib/gthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gthread.c b/glib/gthread.c index 5debfa6ae..a2f3351b2 100644 --- a/glib/gthread.c +++ b/glib/gthread.c @@ -691,10 +691,10 @@ void g_return_if_fail (g_atomic_pointer_get (value_location) == NULL); g_return_if_fail (result != 0); - g_return_if_fail (g_once_init_list != NULL); g_atomic_pointer_set (value_location, result); g_mutex_lock (&g_once_mutex); + g_return_if_fail (g_once_init_list != NULL); g_once_init_list = g_slist_remove (g_once_init_list, (void*) value_location); g_cond_broadcast (&g_once_cond); g_mutex_unlock (&g_once_mutex);