[Commit] fontconfig/src fccfg.c,1.32.2.1,1.32.2.2

Keith Packard commit at keithp.com
Wed Jun 25 18:39:59 PDT 2003


Committed by: keithp

Update of /local/src/CVS/fontconfig/src
In directory home.keithp.com:/tmp/cvs-serv26128/src

Modified Files:
      Tag: fc-2_2_branch
	fccfg.c 
Log Message:
Allow config->cache to be null (as it is when $HOME is not set) (2.2 branch)

Index: fccfg.c
===================================================================
RCS file: /local/src/CVS/fontconfig/src/fccfg.c,v
retrieving revision 1.32.2.1
retrieving revision 1.32.2.2
diff -u -d -r1.32.2.1 -r1.32.2.2
--- fccfg.c	22 Apr 2003 06:29:31 -0000	1.32.2.1
+++ fccfg.c	26 Jun 2003 00:39:56 -0000	1.32.2.2
@@ -160,7 +160,8 @@
     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 @@
     if (!cache)
 	goto bail1;
 
-    FcGlobalCacheLoad (cache, config->cache);
+    if (config->cache)
+	FcGlobalCacheLoad (cache, config->cache);
 
     list = FcConfigGetFontDirs (config);
     if (!list)
@@ -211,7 +213,8 @@
     if (FcDebug () & FC_DBG_FONTSET)
 	FcFontSetPrint (fonts);
 
-    FcGlobalCacheSave (cache, config->cache);
+    if (config->cache)
+	FcGlobalCacheSave (cache, config->cache);
     FcGlobalCacheDestroy (cache);
 
     FcConfigSetFonts (config, fonts, FcSetSystem);




More information about the Commit mailing list