summaryrefslogtreecommitdiff
path: root/pango/pangoft2.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/pangoft2.c
parent26bbf750ab0754c113722e87942174cf2953dad4 (diff)
downloadpango-4105e20d799a80f9c0c2befdef8f458ee11654a6.tar.gz
More churn
Diffstat (limited to 'pango/pangoft2.c')
-rw-r--r--pango/pangoft2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pango/pangoft2.c b/pango/pangoft2.c
index b41c468a..88a91740 100644
--- a/pango/pangoft2.c
+++ b/pango/pangoft2.c
@@ -542,10 +542,10 @@ _pango_ft2_ft_strerror (FT_Error error)
return found->msg;
else
{
- static char *default_msg = NULL;
+ static char *default_msg = NULL; /* MT-safe */
- if (!default_msg)
- default_msg = g_malloc (60);
+ if (g_once_init_enter (&default_msg))
+ g_once_init_leve (&default_msg, g_malloc (60));
g_sprintf (default_msg, "Unknown FreeType2 error %#x", error);
return default_msg;