Update Group.lua

Fix for the error attempt to index a nil value called from suppression
This commit is contained in:
leka1986
2025-04-12 10:26:34 +02:00
committed by GitHub
parent 49c11073e6
commit d11acecdac

View File

@@ -1842,8 +1842,12 @@ end
-- @param #GROUP self
-- @return #table
function GROUP:GetTemplateRoutePoints()
if not self or not self:IsAlive() then return end
local GroupName = self:GetName()
return UTILS.DeepCopy( _DATABASE:GetGroupTemplate( GroupName ).route.points )
local template = _DATABASE:GetGroupTemplate(GroupName)
if template and template.route and template.route.points then
return UTILS.DeepCopy(template.route.points)
end
end