diff --git a/modules/control/warps.lua b/modules/control/warps.lua index 07be1b0f..b846460a 100644 --- a/modules/control/warps.lua +++ b/modules/control/warps.lua @@ -229,7 +229,7 @@ function Warps.remove_warp_area(warp_id) {position.x+radius, position.y+radius} } } - for _, entity in pairs(entities) do if entity.name ~= 'player' then entity.destroy() end end + for _, entity in pairs(entities) do if entity and entity.valid and entity.name ~= 'player' then entity.destroy() end end end --[[-- Set a warp to be the spawn point for a force, force must own this warp