src/array_list.c

changeset 995
d3d4f245b843
parent 986
38fa7e41194c
--- a/src/array_list.c	Wed Nov 27 22:33:30 2024 +0100
+++ b/src/array_list.c	Thu Nov 28 19:37:00 2024 +0100
@@ -63,7 +63,7 @@
     void *newmem;
     if (array == alloc->ptr2) {
         newmem = cxMalloc(al, capacity * elem_size);
-        if (newmem != NULL) {
+        if (newmem != NULL && array != NULL) {
             memcpy(newmem, array, capacity * elem_size);
         }
     } else {

mercurial