Commit a7f6e2c8 authored by Behdad Esfahbod's avatar Behdad Esfahbod Committed by Behdad Esfahbod

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
parent e8442a52
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.
2008-08-15 Sven Herzberg <sven@imendio.com>
Use the g_test_*() API for this test
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment