Commit 339c83e1 authored by Keith Packard's avatar Keith Packard
Browse files

Allow config->cache to be null (as it is when $HOME is not set) (2.2

    branch)
parent e65f957f
......@@ -160,7 +160,8 @@ FcConfigDestroy (FcConfig *config)
FcStrSetDestroy (config->fontDirs);
FcStrSetDestroy (config->configFiles);
FcStrFree (config->cache);
if (config->cache)
FcStrFree (config->cache);
FcSubstDestroy (config->substPattern);
FcSubstDestroy (config->substFont);
......@@ -193,7 +194,8 @@ FcConfigBuildFonts (FcConfig *config)
if (!cache)
goto bail1;
FcGlobalCacheLoad (cache, config->cache);
if (config->cache)
FcGlobalCacheLoad (cache, config->cache);
list = FcConfigGetFontDirs (config);
if (!list)
......@@ -211,7 +213,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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment