src/list.c

changeset 1485
814c1c61488d
parent 1482
6769cb72521b
child 1487
0ff535033b78
--- a/src/list.c	Tue Nov 11 17:02:26 2025 +0100
+++ b/src/list.c	Tue Nov 11 18:15:17 2025 +0100
@@ -186,7 +186,11 @@
 }
 
 static int cx_pl_change_capacity(struct cx_list_s *list, size_t cap) {
-    return list->climpl->change_capacity(list, cap);
+    if (list->climpl->change_capacity == NULL) {
+        return 0;
+    } else {
+        return list->climpl->change_capacity(list, cap);
+    }
 }
 
 static struct cx_iterator_s cx_pl_iterator(

mercurial