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:23:41 +0800 |
commit | 155c260f5a7ef39c5f1403e024363844cc67a0f2 (patch) | |
tree | d7f750e6bdb0be8c4d2617c9ad4e2e012e8570cb /libempathy | |
parent | b2e3fe2be77ea14d5354bfd9eec9b62f007daa1b (diff) | |
download | gsoc2013-empathy-155c260f5a7ef39c5f1403e024363844cc67a0f2.tar gsoc2013-empathy-155c260f5a7ef39c5f1403e024363844cc67a0f2.tar.gz gsoc2013-empathy-155c260f5a7ef39c5f1403e024363844cc67a0f2.tar.bz2 gsoc2013-empathy-155c260f5a7ef39c5f1403e024363844cc67a0f2.tar.lz gsoc2013-empathy-155c260f5a7ef39c5f1403e024363844cc67a0f2.tar.xz gsoc2013-empathy-155c260f5a7ef39c5f1403e024363844cc67a0f2.tar.zst gsoc2013-empathy-155c260f5a7ef39c5f1403e024363844cc67a0f2.zip |
use tp_clear_object()
Diffstat (limited to 'libempathy')
-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); } |