[gnome-contacts] contacts-store: Check if new individual is not empty
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts] contacts-store: Check if new individual is not empty
- Date: Wed, 29 Sep 2021 09:16:40 +0000 (UTC)
commit 6883d4fa2a1b3803896a5f5737df765d8f6f6f62
Author: Krifa75 <yahiaoui fakhri gmail com>
Date: Wed Sep 22 23:31:35 2021 +0200
contacts-store: Check if new individual is not empty
When deleting a contact the changes may contains empty value which triggers a warning when deleting one
src/contacts-store.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/contacts-store.vala b/src/contacts-store.vala
index a9c6a57b..91e99e5a 100644
--- a/src/contacts-store.vala
+++ b/src/contacts-store.vala
@@ -144,7 +144,8 @@ public class Contacts.Store : GLib.Object {
if (i != null)
to_remove.add (i);
foreach (var new_i in changes[i]) {
- to_add.add (new_i);
+ if (new_i != null)
+ to_add.add (new_i);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]