From 924fa3d90eb1a4949e431b0bd6284071f0d5b38b Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Date: Mon, 18 Oct 2010 14:39:55 +0200 Subject: [PATCH] instantiate the media manager only if the protocol support calls (fdo #30594) Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=30594> Signed-off-by: Will Thompson <will.thompson@collabora.co.uk> --- src/connection.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/connection.c b/src/connection.c index 631d5a9..8ffd281 100644 --- a/src/connection.c +++ b/src/connection.c @@ -446,9 +446,13 @@ _haze_connection_create_channel_managers (TpBaseConnection *base) g_ptr_array_add (channel_managers, self->im_factory); #ifdef ENABLE_MEDIA - self->media_manager = HAZE_MEDIA_MANAGER ( - g_object_new (HAZE_TYPE_MEDIA_MANAGER, "connection", self, NULL)); - g_ptr_array_add (channel_managers, self->media_manager); + /* Instantiate the media manager only if the protocol support calls */ + if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC (self->priv->prpl_info, initiate_media)) + { + self->media_manager = HAZE_MEDIA_MANAGER ( + g_object_new (HAZE_TYPE_MEDIA_MANAGER, "connection", self, NULL)); + g_ptr_array_add (channel_managers, self->media_manager); + } #endif self->contact_list = HAZE_CONTACT_LIST ( -- 1.7.3.3