From 2130b68b897bdff2abc93d9bbf5a31e9e4ad17d5 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 1 Sep 2010 16:48:01 +0200 Subject: [PATCH] Bug #569329 - [groupwise] EDS crashed when checking contacts --- addressbook/backends/groupwise/e-book-backend-groupwise.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/addressbook/backends/groupwise/e-book-backend-groupwise.c b/addressbook/backends/groupwise/e-book-backend-groupwise.c index f06c481..0ef6d68 100644 --- a/addressbook/backends/groupwise/e-book-backend-groupwise.c +++ b/addressbook/backends/groupwise/e-book-backend-groupwise.c @@ -3055,11 +3055,14 @@ update_address_book_deltas (EBookBackendGroupwise *ebgw) if (enable_debug) printf ("Contact List modified fetching the members of the contact list\n"); + item = NULL; status = e_gw_connection_get_item (ebgw->priv->cnc, ebgw->priv->container_id, e_contact_get (contact, E_CONTACT_UID), "name email default members", &item); - g_object_unref (contact); - contact = e_contact_new (); - fill_contact_from_gw_item (contact, item, ebgw->priv->categories_by_id); - g_object_unref (item); + if (status == E_GW_CONNECTION_STATUS_OK && item) { + g_object_unref (contact); + contact = e_contact_new (); + fill_contact_from_gw_item (contact, item, ebgw->priv->categories_by_id); + g_object_unref (item); + } } if (enable_debug) -- 2.7.4