summaryrefslogtreecommitdiff
path: root/telepathy-glib/base-channel.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-08-24 14:07:23 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2010-08-24 14:07:23 +0100
commit90c08e7c5f0e827732c12fb7b13ac63e3ee0073c (patch)
tree6b4e07280c2afb5573c1e9f81964b242bec7d781 /telepathy-glib/base-channel.c
parenta4a4b59d3374f64bf511bb339a29b6b5e88b9b5d (diff)
downloadtelepathy-glib-90c08e7c5f0e827732c12fb7b13ac63e3ee0073c.tar.gz
tp_base_channel_destroyed(): cope if we're not registered
If the channel dies before it's been registered, unregistering will crash.
Diffstat (limited to 'telepathy-glib/base-channel.c')
-rw-r--r--telepathy-glib/base-channel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/telepathy-glib/base-channel.c b/telepathy-glib/base-channel.c
index 2942519f0..0b436f81d 100644
--- a/telepathy-glib/base-channel.c
+++ b/telepathy-glib/base-channel.c
@@ -221,7 +221,11 @@ tp_base_channel_destroyed (TpBaseChannel *chan)
chan->priv->destroyed = TRUE;
tp_svc_channel_emit_closed (chan);
- tp_dbus_daemon_unregister_object (bus, chan);
+ if (chan->priv->registered)
+ {
+ tp_dbus_daemon_unregister_object (bus, chan);
+ chan->priv->registered = FALSE;
+ }
}
/**