summaryrefslogtreecommitdiff
path: root/pango/pangofc-font.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2015-04-04 17:07:07 -0700
committerBehdad Esfahbod <behdad@behdad.org>2015-04-04 17:07:07 -0700
commitef69cbb18b00d7e454cf881a8f58bdabad04ecef (patch)
tree96e548ea7c82d00e2fd7675979eff04afa5abb5b /pango/pangofc-font.c
parent1a767088167b2b71fdc0f8663cd3e1ba7e919862 (diff)
downloadpango-ef69cbb18b00d7e454cf881a8f58bdabad04ecef.tar.gz
Fix MT-unsafe initializations
Diffstat (limited to 'pango/pangofc-font.c')
-rw-r--r--pango/pangofc-font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index 79dbbbcf..b463e90c 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -342,8 +342,8 @@ pango_fc_font_find_shaper (PangoFont *font G_GNUC_UNUSED,
guint32 ch)
{
static PangoEngineShape *shaper;
- if (!shaper)
- shaper = g_object_new (pango_fc_shape_engine_get_type(), NULL); /* XXX MT-unsafe */
+ if (g_once_init_enter (&shaper))
+ g_once_init_leave (&shaper, g_object_new (pango_fc_shape_engine_get_type(), NULL));
return shaper;
}