]> git.wh0rd.org - fontconfig.git/commitdiff
Properly order the FcConfigAddFontDir and FcConfigNormalizeFontDir calls to
authorPatrick Lam <plam@MIT.EDU>
Wed, 18 Jan 2006 15:41:15 +0000 (15:41 +0000)
committerPatrick Lam <plam@MIT.EDU>
Wed, 18 Jan 2006 15:41:15 +0000 (15:41 +0000)
    avoid crashes.
reviewed by: plam

ChangeLog
src/fcdir.c

index 8bcf9fb64b8236712ea342df0b6f176353ccf241..18a626caa89b9e7a2d5eff1d3a5599ac4c079cbe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-01-18  Mike Fabian  <mfabian@suse.de>
+       reviewed by: plam
+       
+       * src/fcdir.c (FcDirScanConfig):
+
+       Properly order the FcConfigAddFontDir and FcConfigNormalizeFontDir
+       calls to avoid crashes.
+
 2006-01-14  Patirck Lam  <plam@mit.edu>
        * src/fccache.c (FcDirCacheConsume):
 
index 3e6acae6d1495a95782134cc8fc1a636f7a4154d..6db0b8bddf3c15b96de1be0b3476817fe85de5d4 100644 (file)
@@ -131,6 +131,9 @@ FcDirScanConfig (FcFontSet  *set,
     if (config && !FcConfigAcceptFilename (config, dir))
        return FcTrue;
 
+    if (config)
+        FcConfigAddFontDir (config, dir);
+
     if (!force)
     {
        /*
@@ -165,7 +168,6 @@ FcDirScanConfig (FcFontSet  *set,
        return FcFalse;
     }
 
-    FcConfigAddFontDir (config, dir);
     tmpSet = FcFontSetCreate();
     if (!tmpSet)
     {