From 4fc6b34d1c14cc61f553ca59264d0909656933f3 Mon Sep 17 00:00:00 2001 From: marha Date: Thu, 17 Jan 2013 09:22:05 +0100 Subject: fontconfig libxcb mesa xkbcomp git update 17 jan 2013 fontconfig: 671bcb34e23ed03b1f564af35560db81f8b12b96 libxcb: 0dd8f8d26a758bc385e79d9239bf6ef2e3d7bf13 mesa: 56c01d81094795286828ecb83713e043695e905a xkbcomp: ed1b90216e59e6b3ac6ac5fd2faca8e056c76caa --- fontconfig/src/fccache.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'fontconfig/src/fccache.c') 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); } -- cgit v1.2.3