aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-11 20:56:17 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-11 21:34:55 +0800
commit2bae9ac9f9dded0762344c1478202d78e7f01200 (patch)
tree1a7ccac4bd9b56ec9e20600e191e99017e95aeaa
parent904bdd9b2d01cba1894f7626cdfce74983e12a0b (diff)
downloadgsoc2013-empathy-2bae9ac9f9dded0762344c1478202d78e7f01200.tar
gsoc2013-empathy-2bae9ac9f9dded0762344c1478202d78e7f01200.tar.gz
gsoc2013-empathy-2bae9ac9f9dded0762344c1478202d78e7f01200.tar.bz2
gsoc2013-empathy-2bae9ac9f9dded0762344c1478202d78e7f01200.tar.lz
gsoc2013-empathy-2bae9ac9f9dded0762344c1478202d78e7f01200.tar.xz
gsoc2013-empathy-2bae9ac9f9dded0762344c1478202d78e7f01200.tar.zst
gsoc2013-empathy-2bae9ac9f9dded0762344c1478202d78e7f01200.zip
check if the search widget exists before trying to use it
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c5
1 files changed, 4 insertions, 1 deletions
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,