aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/pas/pas-backend-file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index 2dbd27a89a..02964ffe6b 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -415,6 +415,9 @@ pas_backend_file_search (PASBackendFile *bf,
DBT id_dbt, vcard_dbt;
int i;
+ if (!bf->priv->loaded)
+ return;
+
view->search_sexp = e_sexp_new();
view->search_context = g_new0(PASBackendFileSearchContext, 1);
@@ -436,7 +439,7 @@ pas_backend_file_search (PASBackendFile *bf,
while (db_error == 0) {
/* don't include the version in the list of cards */
- if (id_dbt.size != strlen(PAS_BACKEND_FILE_VERSION_NAME + 1)
+ if (id_dbt.size != strlen(PAS_BACKEND_FILE_VERSION_NAME) + 1
|| strcmp (id_dbt.data, PAS_BACKEND_FILE_VERSION_NAME)) {
char *vcard_string = vcard_dbt.data;