summaryrefslogtreecommitdiffstats
path: root/tasklst.c
diff options
context:
space:
mode:
Diffstat (limited to 'tasklst.c')
-rw-r--r--tasklst.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tasklst.c b/tasklst.c
index a684b2e..d22169e 100644
--- a/tasklst.c
+++ b/tasklst.c
@@ -159,6 +159,9 @@ task_lst_del_task(TaskLst *list, int i)
if (next != NULL)
next->prev = prev;
+ if (list->first == del)
+ list->first = next;
+
free(del);
return 0;