From: Patrick Lam Date: Wed, 18 Jan 2006 15:41:15 +0000 (+0000) Subject: Properly order the FcConfigAddFontDir and FcConfigNormalizeFontDir calls to X-Git-Tag: fc-2_3_94~65 X-Git-Url: https://git.wh0rd.org/?p=fontconfig.git;a=commitdiff_plain;h=58bdd29619e6580477918f8c8d77aadbe5e427a4 Properly order the FcConfigAddFontDir and FcConfigNormalizeFontDir calls to avoid crashes. reviewed by: plam --- diff --git a/ChangeLog b/ChangeLog index 8bcf9fb..18a626c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-01-18 Mike Fabian + reviewed by: plam + + * src/fcdir.c (FcDirScanConfig): + + Properly order the FcConfigAddFontDir and FcConfigNormalizeFontDir + calls to avoid crashes. + 2006-01-14 Patirck Lam * src/fccache.c (FcDirCacheConsume): diff --git a/src/fcdir.c b/src/fcdir.c index 3e6acae..6db0b8b 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -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) {