[evolution-data-server] Bug #601513 - Crashes when trying to add a new contact in MAPI
- From: Milan Crha <mcrha src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #601513 - Crashes when trying to add a new contact in MAPI
- Date: Fri, 18 Dec 2009 14:39:30 +0000 (UTC)
commit 1c9263d533dc3cc6c354a65f1447134ea5f7db6e
Author: Milan Crha <mcrha redhat com>
Date: Fri Dec 18 15:38:27 2009 +0100
Bug #601513 - Crashes when trying to add a new contact in MAPI
addressbook/libebook/e-book.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index 0433896..fdfb75f 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -1348,17 +1348,21 @@ get_contacts_reply(DBusGProxy *proxy, gchar **vcards, GError *error, gpointer us
AsyncData *data = user_data;
GList *list = NULL;
EBookListCallback cb = data->callback;
- if (vcards) {
+
+ if (!error && vcards) {
gchar **i = vcards;
+
while (*i != NULL) {
list = g_list_prepend (list, e_contact_new_from_vcard (*i++));
}
+
+ g_strfreev (vcards);
+
+ list = g_list_reverse (list);
}
- list = g_list_reverse (list);
if (cb)
cb (data->book, get_status_from_error (error), list, data->closure);
- g_strfreev (vcards);
g_object_unref (data->book);
g_slice_free (AsyncData, data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]