[Telepathy-commits] [telepathy-gabble/master] Check if gabble_presence_cache_get() returns NULL

Alban Crequy alban.crequy at collabora.co.uk
Tue Feb 10 01:28:10 PST 2009


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

diff --git a/src/media-channel.c b/src/media-channel.c
index 0e5fd4c..1465108 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -1176,6 +1176,12 @@ _pick_best_content_type (GabbleMediaChannel *chan, TpHandle peer,
 
   presence = gabble_presence_cache_get (priv->conn->presence_cache, peer);
 
+  if (presence == NULL)
+    {
+      DEBUG ("contact %d has no presence available", peer);
+      return NULL;
+    }
+
   if (gabble_presence_resource_has_caps (presence, resource,
           PRESENCE_CAP_JINGLE_RTP))
     {
-- 
1.5.6.5




More information about the telepathy-commits mailing list