summaryrefslogtreecommitdiff
path: root/pango/pango-ot-ruleset.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2012-08-27 23:43:38 -0400
committerBehdad Esfahbod <behdad@behdad.org>2012-08-28 00:05:19 -0400
commit4105e20d799a80f9c0c2befdef8f458ee11654a6 (patch)
treee98bb1e985584a28267af6e892471c3617053665 /pango/pango-ot-ruleset.c
parent26bbf750ab0754c113722e87942174cf2953dad4 (diff)
downloadpango-4105e20d799a80f9c0c2befdef8f458ee11654a6.tar.gz
More churn
Diffstat (limited to 'pango/pango-ot-ruleset.c')
-rw-r--r--pango/pango-ot-ruleset.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pango/pango-ot-ruleset.c b/pango/pango-ot-ruleset.c
index 473647bb..93ba6174 100644
--- a/pango/pango-ot-ruleset.c
+++ b/pango/pango-ot-ruleset.c
@@ -68,10 +68,10 @@ const PangoOTRuleset *
pango_ot_ruleset_get_for_description (PangoOTInfo *info,
const PangoOTRulesetDescription *desc)
{
- static PangoOTRuleset *ruleset;
+ static PangoOTRuleset *ruleset; /* MT-safe */
- if (!ruleset)
- ruleset = g_object_new (PANGO_TYPE_OT_RULESET, NULL);
+ if (g_once_init_enter (&ruleset))
+ g_once_init_leave (&ruleset, g_object_new (PANGO_TYPE_OT_RULESET, NULL));
return ruleset;
}