[evolution-data-server] Bug #668811 - EBookBackendSqliteDB can be asked for an unknown contact
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #668811 - EBookBackendSqliteDB can be asked for an unknown contact
- Date: Tue, 31 Jan 2012 14:47:14 +0000 (UTC)
commit d49b0b79a113bfc6fc9ddf431bf4a437483105db
Author: Milan Crha <mcrha redhat com>
Date: Tue Jan 31 15:46:46 2012 +0100
Bug #668811 - EBookBackendSqliteDB can be asked for an unknown contact
.../libedata-book/e-book-backend-sqlitedb.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.c b/addressbook/libedata-book/e-book-backend-sqlitedb.c
index 15bd2f4..161066a 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -921,7 +921,7 @@ e_book_backend_sqlitedb_get_contact (EBookBackendSqliteDB *ebsdb,
EContact *contact = NULL;
gchar *vcard = e_book_backend_sqlitedb_get_vcard_string (ebsdb, folderid, uid,
fields_of_interest, with_all_required_fields, &err);
- if (!err) {
+ if (!err && vcard) {
contact = e_contact_new_from_vcard_with_uid (vcard, uid);
g_free (vcard);
} else
@@ -1090,6 +1090,10 @@ e_book_backend_sqlitedb_get_vcard_string (EBookBackendSqliteDB *ebsdb,
if (with_all_required_fields)
*with_all_required_fields = local_with_all_required_fields;
+ if (!vcard_str && error && !*error)
+ g_set_error (error, E_BOOK_SDB_ERROR, 0,
+ _("Contact '%s' no found"), uid ? uid : "NULL");
+
return vcard_str;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]