Bug #615049 - Crash in remove_contact at e-addressbook-model.c:202

This commit is contained in:
Milan Crha
2010-07-14 12:28:44 +02:00
parent b727a1a99e
commit ecb600bbb4

View File

@ -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;
}
}
}