diff options
author | Alessandro Pignotti <a.pignotti@sssup.it> | 2011-05-25 15:54:01 +0200 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2012-08-27 22:59:47 -0400 |
commit | ba9119bcef52232c38329a5be91d9b5d158f2bc4 (patch) | |
tree | 0f2878d6a49956980a0bf0d3058bff03e430d1ca /pango/pangocairo-fcfont.c | |
parent | 816c5ab46c51850645ac94e4bf611b7fbda3fa19 (diff) | |
download | pango-ba9119bcef52232c38329a5be91d9b5d158f2bc4.tar.gz |
Make static data thread safe in pangocairo-fcfont.c
Diffstat (limited to 'pango/pangocairo-fcfont.c')
-rw-r--r-- | pango/pangocairo-fcfont.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pangocairo-fcfont.c b/pango/pangocairo-fcfont.c index 1393ce8e..6e4fcd91 100644 --- a/pango/pangocairo-fcfont.c +++ b/pango/pangocairo-fcfont.c @@ -187,8 +187,8 @@ get_gravity_class (void) { static GEnumClass *class = NULL; - if (G_UNLIKELY (!class)) - class = g_type_class_ref (PANGO_TYPE_GRAVITY); + if (g_once_init_enter ((gsize*)&class)) + g_once_init_leave((gsize*)&class, (gsize)g_type_class_ref (PANGO_TYPE_GRAVITY)); return class; } |