diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-02-24 17:19:21 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-02-24 17:19:21 +0000 |
commit | 45ce923b2bef3cea4207b35285756dde72d3fdc8 (patch) | |
tree | c3aa2a428d783cb63e6014eb25dce8323a419f19 /pango/pangoxft-fontmap.c | |
parent | deaf37e27cad73cc96f514b95ae420fa06334eaa (diff) | |
download | pango-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/pangoxft-fontmap.c')
-rw-r--r-- | pango/pangoxft-fontmap.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c index 45a5fbf1..62be892e 100644 --- a/pango/pangoxft-fontmap.c +++ b/pango/pangoxft-fontmap.c @@ -508,11 +508,13 @@ pango_xft_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_xft_font_map_cache_remove (fontmap, font); - - return (PangoFont *)g_object_ref (G_OBJECT(font)); + + return (PangoFont *)font; } return (PangoFont *)_pango_xft_font_new (fontmap, XftPatternDuplicate (match)); |