summaryrefslogtreecommitdiff
path: root/pango/pangocairo-font.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2008-11-28 17:34:57 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2008-11-28 17:34:57 +0000
commit74cc07c44afd2879418389cce57a4129b60d61e6 (patch)
tree0183a27ad517826d064115cf76ba62a0b54033f4 /pango/pangocairo-font.c
parent0a189cf8c9d4489a30bc1a5f0f4ce62bcc8c9a5d (diff)
downloadpango-74cc07c44afd2879418389cce57a4129b60d61e6.tar.gz
Bug 562574 – Pangocariowin32 is leaking every cairo font it ever creates
2008-11-28 Behdad Esfahbod <behdad@gnome.org> Bug 562574 – Pangocariowin32 is leaking every cairo font it ever creates * pango/pangocairo-atsuifont.c (pango_cairo_atsui_font_finalize): * pango/pangocairo-win32font.c (pango_cairo_win32_font_finalize): Finalize shared pangocairo font resources. Oops! * pango/pangocairo-font.c (_pango_cairo_font_private_finalize): Protect against multiple calls to finalize. This is practiced by the pangocairo-fcfont when a font is shutdown and then finalized. svn path=/trunk/; revision=2746
Diffstat (limited to 'pango/pangocairo-font.c')
-rw-r--r--pango/pangocairo-font.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pango/pangocairo-font.c b/pango/pangocairo-font.c
index 15757eee..11cb267b 100644
--- a/pango/pangocairo-font.c
+++ b/pango/pangocairo-font.c
@@ -560,14 +560,18 @@ _pango_cairo_font_private_finalize (PangoCairoFontPrivate *cf_priv)
if (cf_priv->scaled_font)
cairo_scaled_font_destroy (cf_priv->scaled_font);
+ cf_priv->scaled_font = NULL;
_pango_cairo_font_hex_box_info_destroy (cf_priv->hbi);
+ cf_priv->hbi = NULL;
if (cf_priv->glyph_extents_cache)
g_free (cf_priv->glyph_extents_cache);
+ cf_priv->glyph_extents_cache = NULL;
g_slist_foreach (cf_priv->metrics_by_lang, (GFunc)free_metrics_info, NULL);
g_slist_free (cf_priv->metrics_by_lang);
+ cf_priv->metrics_by_lang = NULL;
}
gboolean