From 5861e2609ded6495ebfd4110c4fc8f07ba32ebca Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 3 Mar 2009 01:30:03 +0330 Subject: [PATCH] [pangofc-fontmap] Don't unref NULL object (RH bug# 487593) --- pango/pangofc-fontmap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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++) -- 2.7.4