[telepathy-gabble/master] Survive GetContactCaps when we don't have presence

Will Thompson will.thompson at collabora.co.uk
Wed Sep 30 05:12:05 PDT 2009


---
 src/connection.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/connection.c b/src/connection.c
index 30c7928..5447990 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -2512,6 +2512,12 @@ gabble_connection_get_handle_contact_capabilities (GabbleConnection *self,
   else
     p = gabble_presence_cache_get (self->presence_cache, handle);
 
+  if (p == NULL)
+    {
+      DEBUG ("don't know %u's presence; no caps for them.", handle);
+      return;
+    }
+
   caps = gabble_presence_dup_caps (p);
 
   tp_base_connection_channel_manager_iter_init (&iter, base_conn);
-- 
1.5.6.5




More information about the telepathy-commits mailing list