ucx/map.c

changeset 112
c3f2f16fa4b8
parent 102
64ded9f6a6c6
child 113
dde28a806552
--- a/ucx/map.c	Sat Oct 04 14:54:25 2025 +0200
+++ b/ucx/map.c	Sun Oct 19 21:20:08 2025 +0200
@@ -85,18 +85,21 @@
 // </editor-fold>
 
 CxMapIterator cxMapMutIteratorValues(CxMap *map) {
+    if (map == NULL) map = cxEmptyMap;
     CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_VALUES);
     it.base.mutating = true;
     return it;
 }
 
 CxMapIterator cxMapMutIteratorKeys(CxMap *map) {
+    if (map == NULL) map = cxEmptyMap;
     CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_KEYS);
     it.base.mutating = true;
     return it;
 }
 
 CxMapIterator cxMapMutIterator(CxMap *map) {
+    if (map == NULL) map = cxEmptyMap;
     CxMapIterator it = map->cl->iterator(map, CX_MAP_ITERATOR_PAIRS);
     it.base.mutating = true;
     return it;

mercurial