diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-02-07 20:13:20 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-02-07 20:13:20 +0800 |
commit | cf25437b4330f128f0d35e97a353824177736c53 (patch) | |
tree | 9dffffae4379e91f00ed68bec1e88970ec68a45b | |
parent | b07ca79425096c6e6f1cafda1be19b85cc2983a2 (diff) | |
download | gsoc2013-empathy-cf25437b4330f128f0d35e97a353824177736c53.tar gsoc2013-empathy-cf25437b4330f128f0d35e97a353824177736c53.tar.gz gsoc2013-empathy-cf25437b4330f128f0d35e97a353824177736c53.tar.bz2 gsoc2013-empathy-cf25437b4330f128f0d35e97a353824177736c53.tar.lz gsoc2013-empathy-cf25437b4330f128f0d35e97a353824177736c53.tar.xz gsoc2013-empathy-cf25437b4330f128f0d35e97a353824177736c53.tar.zst gsoc2013-empathy-cf25437b4330f128f0d35e97a353824177736c53.zip |
use tp_clear_object()
-rw-r--r-- | libempathy/empathy-tp-file.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c index cdb3bfab9..d69b2153a 100644 --- a/libempathy/empathy-tp-file.c +++ b/libempathy/empathy-tp-file.c @@ -95,8 +95,6 @@ struct _EmpathyTpFilePrivate { gboolean is_closing; gboolean is_closed; - - gboolean dispose_run; }; enum { @@ -702,27 +700,16 @@ do_dispose (GObject *object) { EmpathyTpFile *self = (EmpathyTpFile *) object; - if (self->priv->dispose_run) - return; - - self->priv->dispose_run = TRUE; - if (self->priv->channel != NULL) { g_signal_handlers_disconnect_by_func (self->priv->channel, tp_file_invalidated_cb, object); - g_object_unref (self->priv->channel); - self->priv->channel = NULL; + tp_clear_object (&self->priv->channel); } - if (self->priv->in_stream != NULL) - g_object_unref (self->priv->in_stream); - - if (self->priv->out_stream != NULL) - g_object_unref (self->priv->out_stream); - - if (self->priv->cancellable != NULL) - g_object_unref (self->priv->cancellable); + tp_clear_object (&self->priv->in_stream); + tp_clear_object (&self->priv->out_stream); + tp_clear_object (&self->priv->cancellable); G_OBJECT_CLASS (empathy_tp_file_parent_class)->dispose (object); } |