diff -r aa55109f01d0 -r a1a728d7ebfd src/map.c --- a/src/map.c Sun Dec 14 14:15:26 2025 +0100 +++ b/src/map.c Sun Dec 14 14:29:27 2025 +0100 @@ -114,7 +114,9 @@ } void *cx_map_emplace(CxMap *map, CxHashKey key) { - return map->cl->put(map, key, NULL).value; + const CxMapEntry entry = map->cl->put(map, key, NULL); + if (entry.key == NULL) return NULL; + return entry.value; } void *cx_map_get(const CxMap *map, CxHashKey key) {