From cb6d97eb1baba6795bb8abdede69902b2440f371 Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Wed, 30 Nov 2005 22:13:21 +0000 Subject: [PATCH] Only add a config file to the set of config files once. reviewed by: plam --- ChangeLog | 7 +++++++ src/fcxml.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 849d55e..45c762e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-30 Behdad Befahbod + reviewed by: plam + + * src/fcxml.c (FcConfigParseAndLoad): + + Only add a config file to the set of config files once. + 2005-11-29 Patrick Lam * src/fcint.h (FcCacheBankToIndex); diff --git a/src/fcxml.c b/src/fcxml.c index 57fd606..e718ca2 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -2368,6 +2368,12 @@ FcConfigParseAndLoad (FcConfig *config, if (!filename) goto bail0; + if (FcStrSetMember (config->configFiles, filename)) + { + FcStrFree (filename); + return FcTrue; + } + if (!FcStrSetAdd (config->configFiles, filename)) { FcStrFree (filename); -- 2.39.5