[telepathy-mission-control/master] McdConnection: _check_presence: guard against recognized_presences not having been set up yet

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Jul 9 05:38:15 PDT 2009


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

diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index f6e0711..1a0b4ba 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -199,6 +199,14 @@ _check_presence (McdConnectionPrivate *priv, TpConnectionPresenceType presence,
 {
     const gchar **fallbacks;
 
+    if (priv->recognized_presences == NULL ||
+        g_hash_table_size (priv->recognized_presences) == 0)
+    {
+        DEBUG ("account %s: recognized presences unknown, not setting "
+               "presence yet", mcd_account_get_unique_name (priv->account));
+        return FALSE;
+    }
+
     if (presence == TP_CONNECTION_PRESENCE_TYPE_UNSET || *status == NULL)
         return FALSE;
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list