summaryrefslogtreecommitdiff
path: root/telepathy-glib/presence-mixin.c
diff options
context:
space:
mode:
authorButch Howard <ext-butch.howard@nokia.com>2010-08-12 11:19:18 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2010-08-12 11:19:18 +0100
commit56f42300097369d4d79965a5d9b0e6abdbe35f7e (patch)
treee50d94d5a614bc7dcf32c63ef3a4c562fce1ff2e /telepathy-glib/presence-mixin.c
parent0621e229d02f3bdb62863dafcd7adbd2262f8194 (diff)
downloadtelepathy-glib-56f42300097369d4d79965a5d9b0e6abdbe35f7e.tar.gz
fd.o #25019: allow TpPresenceMixin on connections without old-style Presence
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25019 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'telepathy-glib/presence-mixin.c')
-rw-r--r--telepathy-glib/presence-mixin.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/telepathy-glib/presence-mixin.c b/telepathy-glib/presence-mixin.c
index 1a3ff5df1..4523dfdfb 100644
--- a/telepathy-glib/presence-mixin.c
+++ b/telepathy-glib/presence-mixin.c
@@ -386,12 +386,16 @@ tp_presence_mixin_emit_presence_update (GObject *obj,
DEBUG ("called.");
- presence_hash = construct_presence_hash (mixin_cls->statuses,
- contact_statuses);
- tp_svc_connection_interface_presence_emit_presence_update (obj,
- presence_hash);
+ if (g_type_interface_peek (G_OBJECT_GET_CLASS (obj),
+ TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE) != NULL)
+ {
+ presence_hash = construct_presence_hash (mixin_cls->statuses,
+ contact_statuses);
+ tp_svc_connection_interface_presence_emit_presence_update (obj,
+ presence_hash);
- g_hash_table_destroy (presence_hash);
+ g_hash_table_destroy (presence_hash);
+ }
if (g_type_interface_peek (G_OBJECT_GET_CLASS (obj),
TP_TYPE_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE) != NULL)