summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-03-03 01:30:03 +0330
committerBehdad Esfahbod <behdad@behdad.org>2009-03-10 06:03:21 -0400
commit5861e2609ded6495ebfd4110c4fc8f07ba32ebca (patch)
treea041cd2f9bcf7b56f48004987be3bf08e5e53157 /pango
parenta45933e695a6a60ebae63b30b5a021859cb85305 (diff)
downloadpango-5861e2609ded6495ebfd4110c4fc8f07ba32ebca.tar.gz
[pangofc-fontmap] Don't unref NULL object (RH bug# 487593)
Diffstat (limited to 'pango')
-rw-r--r--pango/pangofc-fontmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c
index 491b912c..dda54f9c 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++)