diff --git a/sflphone-client-gnome/src/contacts/searchbar.c b/sflphone-client-gnome/src/contacts/searchbar.c
index db416d659c1ebec6a4e7f09033ec88c660cf9397..5363ad496ec9cd7f84fce42e296949fee0dfbd55 100644
--- a/sflphone-client-gnome/src/contacts/searchbar.c
+++ b/sflphone-client-gnome/src/contacts/searchbar.c
@@ -39,7 +39,7 @@ GtkWidget * searchbox;
 GtkWidget * addressbookentry;
 
 GtkWidget * cbox;
-GtkListStore * liststore;
+GtkListStore * liststore = NULL;
 
 gint cboxSignalId;
 
@@ -109,7 +109,7 @@ void update_searchbar_addressbook_list()
             = book_list_iterator->next) {
         book_data = (book_data_t *) book_list_iterator->data;
 
-        if (book_data->active) {
+        if (book_data && book_data->active && activeText) {
 
             gtk_list_store_append (liststore, &iter);
             gtk_list_store_set (liststore, &iter, 0, book_data->name, -1);