[FIXED] attempt to index a nil value (AWACS:_CheckAwacsStatus -> OPSGROUP:GetCallsignName -> GROUP:IsPlayer)

This commit is contained in:
Shafik 2025-01-31 10:30:18 +02:00
parent d06e44d37b
commit 74520b1359

View File

@ -757,7 +757,11 @@ end
-- @param #GROUP self -- @param #GROUP self
-- @return #boolean If true, group is associated with a client or player slot. -- @return #boolean If true, group is associated with a client or player slot.
function GROUP:IsPlayer() function GROUP:IsPlayer()
return self:GetUnit(1):IsPlayer() local unit = self:GetUnit(1)
if unit then
return unit:IsPlayer()
end
return false
end end
--- Returns the UNIT wrapper object with number UnitNumber. If it doesn't exist, tries to return the next available unit. --- Returns the UNIT wrapper object with number UnitNumber. If it doesn't exist, tries to return the next available unit.