diff options
author | Alessandro Pignotti <a.pignotti@sssup.it> | 2011-05-25 16:04:22 +0200 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2012-08-27 23:21:52 -0400 |
commit | a4eeee8e222db740ca83d29217d707db1160ada8 (patch) | |
tree | 7a37f75aba1a94e29b4261c722b860acae1f8d31 /pango/pango-context.c | |
parent | ba9119bcef52232c38329a5be91d9b5d158f2bc4 (diff) | |
download | pango-a4eeee8e222db740ca83d29217d707db1160ada8.tar.gz |
Make static data thread safe in pango-context.c
Diffstat (limited to 'pango/pango-context.c')
-rw-r--r-- | pango/pango-context.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pango-context.c b/pango/pango-context.c index a909cd05..cdb6a53a 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -1368,8 +1368,8 @@ string_from_script (PangoScript script) { static GEnumClass *class = NULL; GEnumValue *value; - if (!class) - class = g_type_class_ref (PANGO_TYPE_SCRIPT); + if (g_once_init_enter ((gsize*)&class)) + g_once_init_leave((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_SCRIPT)); value = g_enum_get_value (class, script); if (!value) |