diff options
author | Milan Crha <mcrha@redhat.com> | 2010-07-14 18:29:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-07-14 18:29:36 +0800 |
commit | daec7c954420bc6e313cf9c019e8145c3156105a (patch) | |
tree | 11e34059fa1d7c0fb87ddd914aa50acf22cb75f7 | |
parent | 5ff9e8dc50e289e49a2177cf032be627c7c5ae85 (diff) | |
download | gsoc2013-evolution-daec7c954420bc6e313cf9c019e8145c3156105a.tar.gz gsoc2013-evolution-daec7c954420bc6e313cf9c019e8145c3156105a.tar.zst gsoc2013-evolution-daec7c954420bc6e313cf9c019e8145c3156105a.zip |
Bug #615049 - Crash in remove_contact at e-addressbook-model.c:202
-rw-r--r-- | 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 4d40ced9e8..1fc040d361 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; } } } |