[gnome-todo] task-list: Turn check into assertion
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] task-list: Turn check into assertion
- Date: Wed, 12 Sep 2018 11:55:06 +0000 (UTC)
commit d32a16bbe216d1476ea24a83cdd3608f55f8d158
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Sep 10 21:52:04 2018 -0300
task-list: Turn check into assertion
We *really* don't want anyone trying to remove a
task from a tasklist that doesn't contain it.
src/gtd-task-list.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/gtd-task-list.c b/src/gtd-task-list.c
index 36c1ad7..c037c06 100644
--- a/src/gtd-task-list.c
+++ b/src/gtd-task-list.c
@@ -648,12 +648,10 @@ gtd_task_list_remove_task (GtdTaskList *list,
g_assert (GTD_IS_TASK_LIST (list));
g_assert (GTD_IS_TASK (task));
+ g_assert (gtd_task_list_contains (list, task));
priv = gtd_task_list_get_instance_private (list);
- if (!gtd_task_list_contains (list, task))
- return;
-
g_signal_handlers_disconnect_by_func (task, task_changed_cb, list);
uid = gtd_object_get_uid (GTD_OBJECT (task));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]