src/linked_list.c

changeset 702
3390b58ad15a
parent 699
35b2b99ee523
child 703
425d4279856f
     1.1 --- a/src/linked_list.c	Mon Apr 24 19:08:56 2023 +0200
     1.2 +++ b/src/linked_list.c	Fri May 05 19:07:56 2023 +0200
     1.3 @@ -355,6 +355,9 @@
     1.4      // set start node
     1.5      ls = *begin;
     1.6  
     1.7 +    // early exit when this list is empty
     1.8 +    if (ls == NULL) return;
     1.9 +
    1.10      // check how many elements are already sorted
    1.11      lc = ls;
    1.12      size_t ln = 1;

mercurial