summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-03-23 15:54:08 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2012-03-23 15:54:08 +0100
commitaff05b97a65bc345ba5dd38252e6957d08cae885 (patch)
tree5d11603aa0a39538219f499601c6b97abc7083ed /src
parent5c3abe7907d7dfcf35da2151cd131eef35bc33ad (diff)
Don't assert if user tries to insert task into itself.
Diffstat (limited to 'src')
-rw-r--r--src/task.h1
1 files changed, 1 insertions, 0 deletions
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) {