aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-19 19:39:17 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-05-25 15:22:42 +0800
commit515c3eac45ed42be34feac88245a8a509825bf82 (patch)
treee6c90f367bef9387779f947ba1b068068fc4a81a /libempathy
parent826d5e5fe6079c3960688edb36d21b6bb7825ad3 (diff)
downloadgsoc2013-empathy-515c3eac45ed42be34feac88245a8a509825bf82.tar
gsoc2013-empathy-515c3eac45ed42be34feac88245a8a509825bf82.tar.gz
gsoc2013-empathy-515c3eac45ed42be34feac88245a8a509825bf82.tar.bz2
gsoc2013-empathy-515c3eac45ed42be34feac88245a8a509825bf82.tar.lz
gsoc2013-empathy-515c3eac45ed42be34feac88245a8a509825bf82.tar.xz
gsoc2013-empathy-515c3eac45ed42be34feac88245a8a509825bf82.tar.zst
gsoc2013-empathy-515c3eac45ed42be34feac88245a8a509825bf82.zip
tp_chat_dispose: use tp_clear_object()
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-chat.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index f60b5ef3d..34e2d40b2 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -39,7 +39,6 @@
#include "empathy-debug.h"
struct _EmpathyTpChatPrivate {
- gboolean dispose_has_run;
TpAccount *account;
EmpathyContact *user;
EmpathyContact *remote_contact;
@@ -815,20 +814,9 @@ tp_chat_dispose (GObject *object)
{
EmpathyTpChat *self = EMPATHY_TP_CHAT (object);
- if (self->priv->dispose_has_run)
- return;
-
- self->priv->dispose_has_run = TRUE;
-
tp_clear_object (&self->priv->account);
-
- if (self->priv->remote_contact != NULL)
- g_object_unref (self->priv->remote_contact);
- self->priv->remote_contact = NULL;
-
- if (self->priv->user != NULL)
- g_object_unref (self->priv->user);
- self->priv->user = NULL;
+ tp_clear_object (&self->priv->remote_contact);
+ tp_clear_object (&self->priv->user);
g_queue_foreach (self->priv->messages_queue, (GFunc) g_object_unref, NULL);
g_queue_clear (self->priv->messages_queue);