[empathy] Fix an assertion failure in the filtering code due to show-offline changes



commit 493056ec895710376ee79e403e6c17ea93029e4a
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Wed Aug 4 17:20:30 2010 +0100

    Fix an assertion failure in the filtering code due to show-offline changes
    
    individual_view_is_visible_individual() is now called even when the live
    search widget isn't in use, so has to fail gracefully in that case.
    Closes: bgo#626041

 libempathy-gtk/empathy-individual-view.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index da6a6c7..7882123 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -148,7 +148,10 @@ individual_view_is_visible_individual (EmpathyIndividualView *self,
   const gchar *str;
   GList *personas, *l;
 
-  g_assert (live != NULL);
+  /* We're only giving the visibility wrt filtering here, not things like
+   * presence. */
+  if (live == NULL || gtk_widget_get_visible (GTK_WIDGET (live)) == FALSE)
+    return TRUE;
 
   /* check alias name */
   str = folks_individual_get_alias (individual);
@@ -197,7 +200,6 @@ individual_view_filter_visible_func (GtkTreeModel *model,
       !gtk_widget_get_visible (priv->search_widget))
      is_searching = FALSE;
 
-
   gtk_tree_model_get (model, iter,
       EMPATHY_INDIVIDUAL_STORE_COL_IS_GROUP, &is_group,
       EMPATHY_INDIVIDUAL_STORE_COL_IS_SEPARATOR, &is_separator,



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