From 515c3eac45ed42be34feac88245a8a509825bf82 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 19 May 2011 13:39:17 +0200 Subject: [PATCH] tp_chat_dispose: use tp_clear_object() --- libempathy/empathy-tp-chat.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index f60b5ef3..34e2d40b 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); -- 2.39.2