summaryrefslogtreecommitdiff
path: root/pango/pangowin32.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pangowin32.c')
-rw-r--r--pango/pangowin32.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c
index d2e8ad5f..1f8c1d25 100644
--- a/pango/pangowin32.c
+++ b/pango/pangowin32.c
@@ -835,7 +835,9 @@ pango_win32_font_finalize (GObject *object)
g_hash_table_destroy (win32font->glyph_info);
- g_object_unref (win32font->fontmap);
+ g_assert (win32font->fontmap != NULL);
+ g_object_remove_weak_pointer (G_OBJECT (win32font->fontmap), (gpointer *) (gpointer) &win32font->fontmap);
+ win32font->fontmap = NULL;
G_OBJECT_CLASS (_pango_win32_font_parent_class)->finalize (object);
}