[evolution/gnome-2-30] Bug #615049 - Crash in remove_contact at e-addressbook-model.c:202
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-30] Bug #615049 - Crash in remove_contact at e-addressbook-model.c:202
- Date: Wed, 14 Jul 2010 10:30:13 +0000 (UTC)
commit daec7c954420bc6e313cf9c019e8145c3156105a
Author: Milan Crha <mcrha redhat com>
Date: Wed Jul 14 12:29:36 2010 +0200
Bug #615049 - Crash in remove_contact at e-addressbook-model.c:202
addressbook/gui/widgets/e-addressbook-model.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index 4d40ced..1fc040d 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -198,10 +198,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;
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]