aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fccache.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-01-17 09:25:28 +0100
committermarha <marha@users.sourceforge.net>2013-01-17 09:25:28 +0100
commit50c07563e17397daf040a32d8fdd3ab397e72371 (patch)
treeae9c109e16ba86a498c43ab62830bca3641a78aa /fontconfig/src/fccache.c
parentdc163f625ef006c8550791122bda28fb3eb67e3d (diff)
parent4fc6b34d1c14cc61f553ca59264d0909656933f3 (diff)
downloadvcxsrv-50c07563e17397daf040a32d8fdd3ab397e72371.tar.gz
vcxsrv-50c07563e17397daf040a32d8fdd3ab397e72371.tar.bz2
vcxsrv-50c07563e17397daf040a32d8fdd3ab397e72371.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig libxcb mesa xkbcomp git update 17 jan 2013
Diffstat (limited to 'fontconfig/src/fccache.c')
-rwxr-xr-xfontconfig/src/fccache.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c
index c37cbe148..d894fc2b6 100755
--- 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);
}