mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 06:26:15 +01:00
GRand: Make sure to g_thread_init_glib()
The last commit should g_thread_init_glib() before attempting to use GOnce.
This commit is contained in:
parent
71c72d5e13
commit
b6a2f502f2
@ -133,6 +133,8 @@ get_random_version (void)
|
||||
static gsize initialized = FALSE;
|
||||
static guint random_version;
|
||||
|
||||
g_thread_init_glib ();
|
||||
|
||||
if (g_once_init_enter (&initialized))
|
||||
{
|
||||
const gchar *version_string = g_getenv ("G_RANDOM_VERSION");
|
||||
|
Loading…
Reference in New Issue
Block a user