aboutsummaryrefslogtreecommitdiffstats
path: root/src/list.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/list.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/list.c b/src/list.c
index d14f5b874..b6322052b 100644
--- a/src/list.c
+++ b/src/list.c
@@ -88,6 +88,9 @@ int insertInListBeforeNode(List * list, ListNode * beforeNode, char * key,
}
else {
node->prevNode = beforeNode->prevNode;
+ if(node->prevNode) {
+ node->prevNode->nextNode = node;
+ }
beforeNode->prevNode = node;
}