summaryrefslogtreecommitdiff
path: root/src/fccache.c
diff options
context:
space:
mode:
authorPatrick Lam <plam@MIT.EDU>2006-04-12 02:38:28 +0000
committerPatrick Lam <plam@MIT.EDU>2006-04-12 02:38:28 +0000
commit5c90509c073b3879fd9e3a2dc9dddeb724757ccf (patch)
tree9827fb88b0a07880b881646164460ffa3339961c /src/fccache.c
parent2de24638b23f65b5586cebe3e9d9f4577a40673e (diff)
Don't crash if config is null (Coverity defect #984).
Diffstat (limited to 'src/fccache.c')
-rw-r--r--src/fccache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fccache.c b/src/fccache.c
index 23c37f1..58f925d 100644
--- a/src/fccache.c
+++ b/src/fccache.c
@@ -320,8 +320,9 @@ FcGlobalCacheReadDir (FcFontSet *set, FcStrSet *dirs, FcGlobalCache * cache, con
if (cache->fd == -1)
return FcFalse;
- if (!(dir = (char *)FcConfigNormalizeFontDir (config, (FcChar8 *)dir)))
- return FcFalse; /* non-existing directory */
+ if (config)
+ if (!(dir = (char *)FcConfigNormalizeFontDir (config, (FcChar8 *)dir)))
+ return FcFalse; /* non-existing directory */
for (d = cache->dirs; d; d = d->next)
{