diff options
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-model.c')
-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 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; } } } |