]> git.wh0rd.org - fontconfig.git/commitdiff
Allow config->cache to be null (as it is when $HOME is not set)
authorKeith Packard <keithp@keithp.com>
Thu, 26 Jun 2003 00:39:04 +0000 (00:39 +0000)
committerKeith Packard <keithp@keithp.com>
Thu, 26 Jun 2003 00:39:04 +0000 (00:39 +0000)
src/fccfg.c

index 709cd42337c23b88c650b57acef7d07b82483534..fd87cb6ea0d0578d071a08b4ac61cc0888c3d0ff 100644 (file)
@@ -178,7 +178,8 @@ FcConfigDestroy (FcConfig *config)
     FcStrSetDestroy (config->acceptGlobs);
     FcStrSetDestroy (config->rejectGlobs);
 
-    FcStrFree (config->cache);
+    if (config->cache)
+       FcStrFree (config->cache);
 
     FcSubstDestroy (config->substPattern);
     FcSubstDestroy (config->substFont);
@@ -211,7 +212,8 @@ FcConfigBuildFonts (FcConfig *config)
     if (!cache)
        goto bail1;
 
-    FcGlobalCacheLoad (cache, config->cache);
+    if (config->cache)
+       FcGlobalCacheLoad (cache, config->cache);
 
     list = FcConfigGetFontDirs (config);
     if (!list)
@@ -230,7 +232,8 @@ FcConfigBuildFonts (FcConfig *config)
     if (FcDebug () & FC_DBG_FONTSET)
        FcFontSetPrint (fonts);
 
-    FcGlobalCacheSave (cache, config->cache);
+    if (config->cache)
+       FcGlobalCacheSave (cache, config->cache);
     FcGlobalCacheDestroy (cache);
 
     FcConfigSetFonts (config, fonts, FcSetSystem);