From 72a13f7a19c2fcffc2507278f3fb5a312b1b5448 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 3 Apr 2026 16:45:12 +0200 Subject: [PATCH] correction append --- Chains_across_the_Island/Fundamentals/double/double.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Chains_across_the_Island/Fundamentals/double/double.c b/Chains_across_the_Island/Fundamentals/double/double.c index e28e8a2..d17ec7a 100644 --- a/Chains_across_the_Island/Fundamentals/double/double.c +++ b/Chains_across_the_Island/Fundamentals/double/double.c @@ -11,7 +11,8 @@ struct dlist *dlist_append(struct dlist *l, int e) new_node->prev = NULL; new_node->next = l; new_node->data = e; - l->prev = new_node; + + if (l) l->prev = new_node; return new_node;