From d949c3d68efee785bde78a56c6df2e4933a605b9 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Fri, 12 Feb 2010 16:25:49 +0100 Subject: [PATCH] Reread fontconfig's cache when needed Get current FontConfig before using it. This prevents poppler from crash when cache FontConfig changes. --- poppler/GlobalParams.cc | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc index 493159d..aaa6218 100644 --- a/poppler/GlobalParams.cc +++ b/poppler/GlobalParams.cc @@ -1189,6 +1189,8 @@ DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) { if (!p) goto fin; + + FCcfg = FcConfigGetCurrent(); FcConfigSubstitute(FCcfg, p, FcMatchPattern); FcDefaultSubstitute(p); set = FcFontSort(FCcfg, p, FcFalse, NULL, &res); -- 1.6.6