summaryrefslogtreecommitdiff
path: root/pango/pangoft2-fontmap.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-02-24 17:19:21 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-02-24 17:19:21 +0000
commit45ce923b2bef3cea4207b35285756dde72d3fdc8 (patch)
treec3aa2a428d783cb63e6014eb25dce8323a419f19 /pango/pangoft2-fontmap.c
parentdeaf37e27cad73cc96f514b95ae420fa06334eaa (diff)
downloadpango-45ce923b2bef3cea4207b35285756dde72d3fdc8.tar.gz
Fix problem where we unref'ed before we ref'ed resulting in entries in the
Sun Feb 24 12:12:09 2002 Owen Taylor <otaylor@redhat.com> * pango/pangoxft-fontmap.c (pango_xft_font_map_new_font): Fix problem where we unref'ed before we ref'ed resulting in entries in the cache that shouldn't have been there. * pango/pangoft2-fontmap.c (pango_ft2_font_map_new_font): Same.
Diffstat (limited to 'pango/pangoft2-fontmap.c')
-rw-r--r--pango/pangoft2-fontmap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pango/pangoft2-fontmap.c b/pango/pangoft2-fontmap.c
index de47afcb..c0077f1e 100644
--- a/pango/pangoft2-fontmap.c
+++ b/pango/pangoft2-fontmap.c
@@ -499,11 +499,13 @@ pango_ft2_font_map_new_font (PangoFontMap *fontmap,
if (font)
{
- /* Revive fonts from cache */
+ g_object_ref (font);
+
+ /* Revive font from cache */
if (font->in_cache)
pango_ft2_font_map_cache_remove (fontmap, font);
-
- return (PangoFont *)g_object_ref (G_OBJECT(font));
+
+ return (PangoFont *)font;
}
return (PangoFont *)_pango_ft2_font_new (fontmap, MiniXftPatternDuplicate (match));