From aff05b97a65bc345ba5dd38252e6957d08cae885 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 23 Mar 2012 15:54:08 +0100 Subject: Don't assert if user tries to insert task into itself. --- src/task.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/task.h b/src/task.h index 5866719..b4afa6e 100644 --- a/src/task.h +++ b/src/task.h @@ -107,6 +107,7 @@ public: ~TaskList(){} void insert(task_t t) { + if(t.id == t.parent_id) return; printf("inserting task %d with parent %d\n", t.id, t.parent_id); if(t.parent_id == -1) { -- cgit v1.2.3