From ecb600bbb40144caf409c245b44b3eadd70eb81d Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 14 Jul 2010 12:28:44 +0200 Subject: Bug #615049 - Crash in remove_contact at e-addressbook-model.c:202 --- addressbook/gui/widgets/e-addressbook-model.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'addressbook') diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index b469e8200d..b46068d3ae 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -199,10 +199,18 @@ remove_contact(EBookView *book_view, const gchar *uid; contact = array->pdata[ii]; + /* check if already removed */ + if (!contact) + continue; + uid = e_contact_get_const (contact, E_CONTACT_UID); + g_return_if_fail (uid != NULL); + if (strcmp (uid, target_uid) == 0) { g_object_unref (contact); g_array_append_val (indices, ii); + array->pdata[ii] = NULL; + break; } } } -- cgit