[Fontconfig] fontconfig: Branch 'master'

Akira TAGOH tagoh at kemper.freedesktop.org
Fri Jul 4 02:05:05 PDT 2014


 src/fccfg.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 5b22776999b6052afe0e829b1a0c0935bbe1e9f7
Author: Akira TAGOH <akira at tagoh.org>
Date:   Fri Jul 4 18:04:52 2014 +0900

    Fix a crash when no sysroot is given and failed to load the default fonts.conf

diff --git a/src/fccfg.c b/src/fccfg.c
index e2555f0..6d32595 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -2342,7 +2342,7 @@ void
 FcConfigSetSysRoot (FcConfig      *config,
 		    const FcChar8 *sysroot)
 {
-    FcChar8 *s;
+    FcChar8 *s = NULL;
     FcBool init = FcFalse;
 
     if (!config)
@@ -2362,9 +2362,12 @@ FcConfigSetSysRoot (FcConfig      *config,
 	}
     }
 
-    s = FcStrCopyFilename (sysroot);
-    if (!s)
-	return;
+    if (sysroot)
+    {
+	s = FcStrCopyFilename (sysroot);
+	if (!s)
+	    return;
+    }
 
     if (config->sysRoot)
 	FcStrFree (config->sysRoot);


More information about the Fontconfig mailing list