aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-08 19:31:09 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-08 21:51:50 +0800
commit04ef027198384baacd47346f59c8a22c5c7d2e20 (patch)
treed19cdf21283530dda4f458ea3ba2ab013d7a6726 /libempathy
parent8ba8fc742b0f53228fb3e507cb99ddcb2e58120d (diff)
downloadgsoc2013-empathy-04ef027198384baacd47346f59c8a22c5c7d2e20.tar
gsoc2013-empathy-04ef027198384baacd47346f59c8a22c5c7d2e20.tar.gz
gsoc2013-empathy-04ef027198384baacd47346f59c8a22c5c7d2e20.tar.bz2
gsoc2013-empathy-04ef027198384baacd47346f59c8a22c5c7d2e20.tar.lz
gsoc2013-empathy-04ef027198384baacd47346f59c8a22c5c7d2e20.tar.xz
gsoc2013-empathy-04ef027198384baacd47346f59c8a22c5c7d2e20.tar.zst
gsoc2013-empathy-04ef027198384baacd47346f59c8a22c5c7d2e20.zip
unref avatar and location in dispose rather than finalize
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);
}