From 581138b5bc552e623588cf79a907602d62660bc9 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 19 Jan 2024 19:06:52 +0100 Subject: [PATCH] Avoid for pairs error --- Moose Development/Moose/Core/Set.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Moose Development/Moose/Core/Set.lua b/Moose Development/Moose/Core/Set.lua index 52c899bec..70fe7eaad 100644 --- a/Moose Development/Moose/Core/Set.lua +++ b/Moose Development/Moose/Core/Set.lua @@ -1204,7 +1204,7 @@ do if not DontSetCargoBayLimit then -- I set the default cargo bay weight limit each time a new group is added to the set. -- TODO Why is this here in the first place? - for UnitID, UnitData in pairs( group:GetUnits() ) do + for UnitID, UnitData in pairs( group:GetUnits() or {} ) do if UnitData and UnitData:IsAlive() then UnitData:SetCargoBayWeightLimit() end