diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-07-24 21:07:33 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-07-24 21:07:33 +0000 |
commit | ca9fe8ffa96743144c9be892b1bc4372c679f227 (patch) | |
tree | fee2a87c3c0a105abcbfa40a8a9b0dc3209beedb /pango | |
parent | 6a296d7c83fa823c91de3832d8d339678c9ad57f (diff) | |
download | pango-ca9fe8ffa96743144c9be892b1bc4372c679f227.tar.gz |
Handle NULL item->analysis.font. (#14576, Morten Welinder)
Thu Jul 24 17:06:38 2003 Owen Taylor <otaylor@redhat.com>
* pango/pango-item.c (pango_item_copy/free): Handle
NULL item->analysis.font. (#14576, Morten Welinder)
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-item.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pango/pango-item.c b/pango/pango-item.c index e090fe57..5c02cdec 100644 --- a/pango/pango-item.c +++ b/pango/pango-item.c @@ -56,7 +56,8 @@ pango_item_copy (PangoItem *item) result->num_chars = item->num_chars; result->analysis = item->analysis; - g_object_ref (result->analysis.font); + if (result->analysis.font) + g_object_ref (result->analysis.font); extra_attrs = NULL; tmp_list = item->analysis.extra_attrs; @@ -86,7 +87,8 @@ pango_item_free (PangoItem *item) g_slist_free (item->analysis.extra_attrs); } - g_object_unref (item->analysis.font); + if (result->analysis.font) + g_object_unref (item->analysis.font); g_free (item); } |