ucx/map.c

changeset 845
f3ab28ed22e5
parent 471
063a9f29098c
child 870
e167cf006213
--- a/ucx/map.c	Mon Oct 13 21:07:59 2025 +0200
+++ b/ucx/map.c	Mon Oct 13 21:31:58 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