[empathy] tp_chat_dispose: use tp_clear_object()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] tp_chat_dispose: use tp_clear_object()
- Date: Wed, 25 May 2011 08:04:19 +0000 (UTC)
commit 515c3eac45ed42be34feac88245a8a509825bf82
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu May 19 13:39:17 2011 +0200
tp_chat_dispose: use tp_clear_object()
libempathy/empathy-tp-chat.c | 16 ++--------------
1 files changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index f60b5ef..34e2d40 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]