From: Behdad Esfahbod Date: Mon, 2 Mar 2009 22:00:03 +0000 (+0330) Subject: [pangofc-fontmap] Don't unref NULL object (RH bug# 487593) X-Git-Tag: 1.24.0~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5861e2609ded6495ebfd4110c4fc8f07ba32ebca;p=platform%2Fupstream%2Fpango.git [pangofc-fontmap] Don't unref NULL object (RH bug# 487593) --- diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c index 491b912..dda54f9 100644 --- a/pango/pangofc-fontmap.c +++ b/pango/pangofc-fontmap.c @@ -839,7 +839,11 @@ pango_fc_fontset_finalize (GObject *object) unsigned int i; for (i = 0; i < fontset->fonts->len; i++) - g_object_unref (g_ptr_array_index(fontset->fonts, i)); + { + PangoFont *font = g_ptr_array_index(fontset->fonts, i); + if (font) + g_object_unref (font); + } g_ptr_array_free (fontset->fonts, TRUE); for (i = 0; i < fontset->coverages->len; i++)