[gnome-todo] list-store: Don't abort when removing items
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] list-store: Don't abort when removing items
- Date: Sat, 20 Jul 2019 22:15:29 +0000 (UTC)
commit de23c90cfbaed149628cc3be12492794b7133aa2
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jul 20 18:59:42 2019 -0300
list-store: Don't abort when removing items
When the items being removed is not present in the
model, don't fail and abort.
src/models/gtd-list-store.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/models/gtd-list-store.c b/src/models/gtd-list-store.c
index fbad702..bd30bcc 100644
--- a/src/models/gtd-list-store.c
+++ b/src/models/gtd-list-store.c
@@ -409,6 +409,9 @@ gtd_list_store_remove (GtdListStore *store,
g_return_if_fail (GTD_IS_LIST_STORE (store));
it = g_hash_table_lookup (store->item_to_iter, item);
+ if (!it)
+ return;
+
g_return_if_fail (!g_sequence_iter_is_end (it));
position = g_sequence_iter_get_position (it);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]