src/ucx/linked_list.c

changeset 491
5454ae7bf86b
parent 490
d218607f5a7e
child 504
c094afcdfb27
--- a/src/ucx/linked_list.c	Fri May 05 18:02:11 2023 +0200
+++ b/src/ucx/linked_list.c	Sun May 07 11:53:27 2023 +0200
@@ -355,6 +355,9 @@
     // set start node
     ls = *begin;
 
+    // early exit when this list is empty
+    if (ls == NULL) return;
+
     // check how many elements are already sorted
     lc = ls;
     size_t ln = 1;

mercurial