diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2012-10-07 15:52:25 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2013-01-02 00:52:14 -0600 |
commit | b97ab0c94938448dc2b780b8f0f60fb68884899f (patch) | |
tree | 9dd92bd30d157f0fa20a78e975e8b6fe65d3ed1b /src/fcstr.c | |
parent | 64af9e1917114c789ad74dd28b3248f8c0525f45 (diff) | |
download | fontconfig-b97ab0c94938448dc2b780b8f0f60fb68884899f.tar.gz |
Make FcGetDefaultLang and FcGetDefaultLangs thread-safe
Diffstat (limited to 'src/fcstr.c')
-rw-r--r-- | src/fcstr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fcstr.c b/src/fcstr.c index e72be5e..f278022 100644 --- a/src/fcstr.c +++ b/src/fcstr.c @@ -1234,6 +1234,10 @@ FcStrSetDestroy (FcStrSet *set) { int i; + /* We rely on this in FcGetDefaultLangs for caching. */ + if (FcRefIsConst (&set->ref)) + return; + if (FcRefDec (&set->ref) != 1) return; |