ucx/map.c

branch
dav-2
changeset 886
da79af4baec8
parent 854
1c8401ece69e
child 889
42cdbf9bbd49
--- a/ucx/map.c	Tue Sep 09 16:01:30 2025 +0200
+++ b/ucx/map.c	Tue Sep 09 20:56:47 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