[telepathy-glib-0.24] telepathy-glib: Fix crash when creating a conference call

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 3 22:48:46 UTC 2021


Module: telepathy-glib
Branch: telepathy-glib-0.24
Commit: ef171780277fb7677b75fd08933a60447ae43d5d
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=ef171780277fb7677b75fd08933a60447ae43d5d

Author: Martin Jones <martin.jones at jollamobile.com>
Date:   Wed Feb  3 18:44:55 2021 +0300

Fix crash when creating a conference call

---

 telepathy-glib/channel-contacts.c |  3 +++
 telepathy-glib/channel-group.c    | 10 +++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/telepathy-glib/channel-contacts.c b/telepathy-glib/channel-contacts.c
index 687e6c5af..6daafe064 100644
--- a/telepathy-glib/channel-contacts.c
+++ b/telepathy-glib/channel-contacts.c
@@ -733,6 +733,9 @@ _tp_channel_contacts_handle_owners_changed (TpChannel *self,
   if (self->priv->cm_too_old_for_contacts)
       return;
 
+  if (!self->priv->group_contact_owners)
+      return;
+
   g_assert (self->priv->group_contact_owners != NULL);
 
   data = g_slice_new (HandleOwnersChangedData);
diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index 204e39830..8dff7565b 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -1385,6 +1385,11 @@ _tp_channel_get_group_properties (TpChannel *self)
   if (priv->handle_owners_changed_sig == NULL)
     DIE ("HandleOwnersChanged");
 
+  /* First try the 0.17 API (properties). If this fails we'll fall back */
+  tp_cli_dbus_properties_call_get_all (self, -1,
+      TP_IFACE_CHANNEL_INTERFACE_GROUP, tp_channel_got_group_properties_cb,
+      NULL, NULL, NULL);
+
   priv->handle_owners_changed_detailed_sig =
       tp_cli_channel_interface_group_connect_to_handle_owners_changed_detailed (
           self, tp_channel_handle_owners_changed_detailed_cb, NULL, NULL, NULL,
@@ -1392,11 +1397,6 @@ _tp_channel_get_group_properties (TpChannel *self)
 
   if (priv->handle_owners_changed_detailed_sig == NULL)
     DIE ("HandleOwnersChangedDetailed");
-
-  /* First try the 0.17 API (properties). If this fails we'll fall back */
-  tp_cli_dbus_properties_call_get_all (self, -1,
-      TP_IFACE_CHANNEL_INTERFACE_GROUP, tp_channel_got_group_properties_cb,
-      NULL, NULL, NULL);
 }
 
 G_GNUC_END_IGNORE_DEPRECATIONS



More information about the telepathy-commits mailing list