aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-contact.c18
1 files changed, 12 insertions, 6 deletions
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);
}