[telepathy-glib/master] Make tp_channel_dispose idempotent
Will Thompson
will.thompson at collabora.co.uk
Sat Jun 6 05:18:35 PDT 2009
---
telepathy-glib/channel.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 82224ed..e9750b3 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -1020,6 +1020,9 @@ tp_channel_dispose (GObject *object)
DEBUG ("%p", self);
+ if (self->priv->connection == NULL)
+ goto finally;
+
if (self->priv->conn_invalidated_id != 0)
g_signal_handler_disconnect (self->priv->connection,
self->priv->conn_invalidated_id);
@@ -1029,6 +1032,7 @@ tp_channel_dispose (GObject *object)
g_object_unref (self->priv->connection);
self->priv->connection = NULL;
+finally:
((GObjectClass *) tp_channel_parent_class)->dispose (object);
}
--
1.5.6.5
More information about the telepathy-commits
mailing list