aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/bbdb/gaimbuddies.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c
index ebafc85f7a..62fc89d9ec 100644
--- a/plugins/bbdb/gaimbuddies.c
+++ b/plugins/bbdb/gaimbuddies.c
@@ -208,7 +208,7 @@ bbdb_sync_buddy_list_in_thread (gpointer data)
for (l = std->blist; l != NULL; l = l->next) {
GaimBuddy *b = l->data;
EBookQuery *query;
- GList *contacts;
+ GList *contacts = NULL;
GError *error = NULL;
EContact *c;
@@ -219,7 +219,10 @@ bbdb_sync_buddy_list_in_thread (gpointer data)
/* Look for an exact match full name == buddy alias */
query = e_book_query_field_test (E_CONTACT_FULL_NAME, E_BOOK_QUERY_IS, b->alias);
- e_book_get_contacts (std->book, query, &contacts, NULL);
+ if (!e_book_get_contacts (std->book, query, &contacts, NULL)) {
+ e_book_query_unref (query);
+ continue;
+ }
e_book_query_unref (query);
if (contacts != NULL) {