diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-23 14:36:15 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-11-23 14:38:18 +0100 |
commit | 2ab8b635056fb0b1cf0c1dcc17ff9232a4bbd143 (patch) | |
tree | c8b44bdbb6cd0b3693e0bdcdf7fa7d0e5a3242d2 | |
parent | 73c564c6f5a99ec0e33abc164d2fb7cfff5597d5 (diff) | |
download | telepathy-logger-2ab8b635056fb0b1cf0c1dcc17ff9232a4bbd143.tar.gz |
entry: use tp_clear_pointer() and tp_clear_object()
-rw-r--r-- | telepathy-logger/entry.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/telepathy-logger/entry.c b/telepathy-logger/entry.c index b140aef..59f3b33 100644 --- a/telepathy-logger/entry.c +++ b/telepathy-logger/entry.c @@ -113,10 +113,7 @@ tpl_entry_finalize (GObject *obj) TplEntry *self = TPL_ENTRY (obj); TplEntryPriv *priv = self->priv; - g_free (priv->chat_id); - priv->chat_id = NULL; - - tp_clear_object (&priv->account); + tp_clear_pointer (&priv->chat_id, g_free); G_OBJECT_CLASS (tpl_entry_parent_class)->finalize (obj); } @@ -128,16 +125,9 @@ tpl_entry_dispose (GObject *obj) TplEntry *self = TPL_ENTRY (obj); TplEntryPriv *priv = self->priv; - if (priv->sender != NULL) - { - g_object_unref (priv->sender); - priv->sender = NULL; - } - if (priv->receiver != NULL) - { - g_object_unref (priv->receiver); - priv->receiver = NULL; - } + tp_clear_object (&priv->account); + tp_clear_object (&priv->sender); + tp_clear_object (&priv->receiver); G_OBJECT_CLASS (tpl_entry_parent_class)->dispose (obj); } |