From 2bae9ac9f9dded0762344c1478202d78e7f01200 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 11 Jun 2010 14:56:17 +0200 Subject: check if the search widget exists before trying to use it --- libempathy-gtk/empathy-contact-list-view.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index 200524d25..ec286debf 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -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, -- cgit v1.2.3