summaryrefslogtreecommitdiffstats
path: root/libcnary/node_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcnary/node_list.c')
-rw-r--r--libcnary/node_list.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcnary/node_list.c b/libcnary/node_list.c
index a45457d..b0dca0a 100644
--- a/libcnary/node_list.c
+++ b/libcnary/node_list.c
@@ -142,6 +142,8 @@ int node_list_remove(node_list_t* list, node_t* node) {
// we just removed the first element
if (newnode) {
newnode->prev = NULL;
+ } else {
+ list->end = NULL;
}
list->begin = newnode;
}