mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #2237 from shaji-Dev/master
[FIXED] attempt to index a nil value
This commit is contained in:
commit
8e286edd25
@ -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.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user