diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-07-24 21:08:08 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-07-24 21:08:08 +0000 |
commit | 329eeb9ba6e7f9d4c4544b18f4ff478edebb9808 (patch) | |
tree | 27727dc6908116b058862a62b8d8c5e80ba4bc9f /pango | |
parent | 17f50a2ce2fae766221269eb52015d0adb3efab2 (diff) | |
download | pango-329eeb9ba6e7f9d4c4544b18f4ff478edebb9808.tar.gz |
Handle NULL item->analysis.font. (#114576, 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. (#114576, 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); } |