[empathy: 3/7] empathy-individual-store: only check for presence in presence-enabled personas



commit 1e22706c294c3b775d1963aabff29a0695ccf595
Author: Jonny Lamb <jonnylamb gnome org>
Date:   Mon Oct 18 13:15:22 2010 +0100

    empathy-individual-store: only check for presence in presence-enabled personas
    
    Signed-off-by: Jonny Lamb <jonnylamb gnome org>

 libempathy-gtk/empathy-individual-store.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c
index abd1d02..ce2eacf 100644
--- a/libempathy-gtk/empathy-individual-store.c
+++ b/libempathy-gtk/empathy-individual-store.c
@@ -164,7 +164,13 @@ individual_get_client_types (FolksIndividual *individual)
   personas = folks_individual_get_personas (individual);
   for (l = personas; l != NULL; l = l->next)
     {
-      FolksPresence *presence = FOLKS_PRESENCE (l->data);
+      FolksPresence *presence;
+
+      /* We only want personas which implement FolksPresence */
+      if (!FOLKS_IS_PRESENCE (l->data))
+        continue;
+
+      presence = FOLKS_PRESENCE (l->data);
 
       if (folks_presence_typecmp (folks_presence_get_presence_type (presence),
               presence_type) > 0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]