From 04ef027198384baacd47346f59c8a22c5c7d2e20 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 8 Apr 2010 13:31:09 +0200 Subject: unref avatar and location in dispose rather than finalize --- libempathy/empathy-contact.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'libempathy') diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index ea5f91d1d..707031afb 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -157,6 +157,18 @@ contact_dispose (GObject *object) g_object_unref (priv->account); priv->account = NULL; + if (priv->avatar != NULL) + { + empathy_avatar_unref (priv->avatar); + priv->avatar = NULL; + } + + if (priv->location != NULL) + { + g_hash_table_unref (priv->location); + priv->location = NULL; + } + G_OBJECT_CLASS (empathy_contact_parent_class)->dispose (object); } @@ -304,12 +316,6 @@ contact_finalize (GObject *object) g_free (priv->id); g_free (priv->presence_message); - if (priv->avatar) - empathy_avatar_unref (priv->avatar); - - if (priv->location != NULL) - g_hash_table_unref (priv->location); - G_OBJECT_CLASS (empathy_contact_parent_class)->finalize (object); } -- cgit v1.2.3