summaryrefslogtreecommitdiff
path: root/gtk/gtksettings.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2008-08-15 19:43:20 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2008-08-15 19:43:20 +0000
commita7f6e2c8fbb18f8bb8cfdba5c013d04738219246 (patch)
treeca39cd28397c6b11a8a7bfb5ac517ad4b35373c6 /gtk/gtksettings.c
parente8442a52aa6659a1aabd172ccbe00be9fdb09fdc (diff)
downloadgtk+-a7f6e2c8fbb18f8bb8cfdba5c013d04738219246.tar.gz
Bug 547680 – fontconfig monitoring can crash apps
2008-08-15 Behdad Esfahbod <behdad@gnome.org> Bug 547680 – fontconfig monitoring can crash apps * gtk/gtksettings.c (settings_update_fontconfig): Clear pango cache before recreating fontconfig config. svn path=/trunk/; revision=21134
Diffstat (limited to 'gtk/gtksettings.c')
-rw-r--r--gtk/gtksettings.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 3fd7f8cf4f..32e783944d 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -2090,7 +2090,7 @@ settings_update_fontconfig (GtkSettings *settings)
static guint last_update_timestamp;
static gboolean last_update_needed;
- gint timestamp;
+ guint timestamp;
g_object_get (settings,
"gtk-fontconfig-timestamp", &timestamp,
@@ -2105,11 +2105,12 @@ settings_update_fontconfig (GtkSettings *settings)
PangoFontMap *fontmap = pango_cairo_font_map_get_default ();
gboolean update_needed = FALSE;
- if (PANGO_IS_FC_FONT_MAP (fontmap) &&
- !FcConfigUptoDate (NULL) && FcInitReinitialize ())
+ /* bug 547680 */
+ if (PANGO_IS_FC_FONT_MAP (fontmap) && !FcConfigUptoDate (NULL))
{
- update_needed = TRUE;
pango_fc_font_map_cache_clear (PANGO_FC_FONT_MAP (fontmap));
+ if (FcInitReinitialize ())
+ update_needed = TRUE;
}
last_update_timestamp = timestamp;