src/list.c

changeset 1345
79a865252b16
parent 1319
aa1f580f8f59
--- a/src/list.c	Mon Aug 18 23:06:27 2025 +0200
+++ b/src/list.c	Mon Aug 18 23:08:56 2025 +0200
@@ -476,6 +476,7 @@
         CxList *list,
         size_t index
 ) {
+    if (list == NULL) list = cxEmptyList;
     CxIterator it = list->cl->iterator(list, index, false);
     it.base.mutating = true;
     return it;
@@ -485,6 +486,7 @@
         CxList *list,
         size_t index
 ) {
+    if (list == NULL) list = cxEmptyList;
     CxIterator it = list->cl->iterator(list, index, true);
     it.base.mutating = true;
     return it;

mercurial