]> git.0d.be Git - empathy.git/commitdiff
check if the search widget exists before trying to use it
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 11 Jun 2010 12:56:17 +0000 (14:56 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 11 Jun 2010 13:34:55 +0000 (15:34 +0200)
libempathy-gtk/empathy-contact-list-view.c

index 200524d2548aaa46192afbe31cf9d8c7aa131473..ec286debf6698c37ac22875e97357dcd7f078657 100644 (file)
@@ -149,6 +149,8 @@ contact_list_view_is_visible_contact (EmpathyContactListView *self,
        gchar *dup_str = NULL;
        gboolean visible;
 
+       g_assert (live != NULL);
+
        /* check alias name */
        str = empathy_contact_get_name (contact);
        if (empathy_live_search_match (live, str))
@@ -183,7 +185,8 @@ contact_list_view_filter_visible_func (GtkTreeModel *model,
        GtkTreeIter                 child_iter;
        gboolean                    visible;
 
-       if (!gtk_widget_get_visible (priv->search_widget))
+       if (priv->search_widget == NULL ||
+           !gtk_widget_get_visible (priv->search_widget))
                return TRUE;
 
        gtk_tree_model_get (model, iter,