summaryrefslogtreecommitdiff
path: root/pango/pangofc-fontmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pangofc-fontmap.c')
-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++)