From f9764634e6454ac04a4c7dc2d32a08a01d403f82 Mon Sep 17 00:00:00 2001 From: Ukendio Date: Fri, 20 Feb 2026 04:41:57 +0100 Subject: [PATCH] Ensure that world:exists uses the safe try_get_any --- src/jecs.luau | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jecs.luau b/src/jecs.luau index 98f33c8..1b63f38 100755 --- a/src/jecs.luau +++ b/src/jecs.luau @@ -3718,7 +3718,11 @@ local function world_new(DEBUG: boolean?) end local function world_exists(world: world, entity: i53): boolean - return entity_index_try_get_any(entity) ~= nil + local r = entity_index_try_get_any(entity) + if not r or r.dense == 0 then + return false + end + return true end local function world_contains(world: world, entity: i53): boolean