aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fccache.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-01-17 09:22:05 +0100
committermarha <marha@users.sourceforge.net>2013-01-17 09:22:05 +0100
commit4fc6b34d1c14cc61f553ca59264d0909656933f3 (patch)
treeb6dd33c595a9eb22ecb2f2f2630abfa12772d6c5 /fontconfig/src/fccache.c
parent811d1bcf6d61ea49551abdd7f2294c5af2776913 (diff)
downloadvcxsrv-4fc6b34d1c14cc61f553ca59264d0909656933f3.tar.gz
vcxsrv-4fc6b34d1c14cc61f553ca59264d0909656933f3.tar.bz2
vcxsrv-4fc6b34d1c14cc61f553ca59264d0909656933f3.zip
fontconfig libxcb mesa xkbcomp git update 17 jan 2013
fontconfig: 671bcb34e23ed03b1f564af35560db81f8b12b96 libxcb: 0dd8f8d26a758bc385e79d9239bf6ef2e3d7bf13 mesa: 56c01d81094795286828ecb83713e043695e905a xkbcomp: ed1b90216e59e6b3ac6ac5fd2faca8e056c76caa
Diffstat (limited to 'fontconfig/src/fccache.c')
-rw-r--r--fontconfig/src/fccache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c
index ddcf07030..610b8f0b7 100644
--- a/fontconfig/src/fccache.c
+++ b/fontconfig/src/fccache.c
@@ -449,6 +449,9 @@ FcCacheFindByAddrUnlocked (void *object)
FcCacheSkip **next = fcCacheChains;
FcCacheSkip *s;
+ if (!object)
+ return NULL;
+
/*
* Walk chain pointers one level at a time
*/
@@ -556,7 +559,7 @@ FcCacheObjectDereference (void *object)
skip = FcCacheFindByAddrUnlocked (object);
if (skip)
{
- if (FcRefDec (&skip->ref) <= 1)
+ if (FcRefDec (&skip->ref) == 1)
FcDirCacheDisposeUnlocked (skip->cache);
}
unlock_cache ();
@@ -1109,6 +1112,7 @@ FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose)
cache_dir, ent->d_name, target_dir);
remove = FcTrue;
}
+ FcDirCacheUnload (cache);
}
if (remove)
{
@@ -1118,7 +1122,6 @@ FcDirCacheClean (const FcChar8 *cache_dir, FcBool verbose)
ret = FcFalse;
}
}
- FcDirCacheUnload (cache);
FcStrFree (file_name);
}