diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2008-08-15 19:43:20 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2008-08-15 19:43:20 +0000 |
commit | a7f6e2c8fbb18f8bb8cfdba5c013d04738219246 (patch) | |
tree | ca39cd28397c6b11a8a7bfb5ac517ad4b35373c6 /gtk/gtksettings.c | |
parent | e8442a52aa6659a1aabd172ccbe00be9fdb09fdc (diff) | |
download | gtk+-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.c | 9 |
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", ×tamp, @@ -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; |