[telepathy-glib/master] TpChannel: do not disconnect from a TpProxySignalConnection that's already gone
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Aug 19 09:32:01 PDT 2009
This is incorrect, and in practice, causes a crash.
---
telepathy-glib/channel-group.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index 0d54891..553194c 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -346,6 +346,13 @@ _got_initial_group_flags (TpChannel *self,
if (flags != 0)
g_object_notify ((GObject *) self, "group-flags");
+ if (tp_proxy_get_invalidated (self) != NULL)
+ {
+ /* Because the proxy has been invalidated, it is not safe to call
+ * tp_proxy_signal_connection_disconnect (below), so just return early */
+ return;
+ }
+
/* If the channel claims to support MembersChangedDetailed, disconnect from
* MembersChanged. Otherwise, disconnect from MembersChangedDetailed in case
* it secretly emits it anyway, so we're only listening to one change
--
1.5.6.5
More information about the telepathy-commits
mailing list