aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
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);