mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Avoid a crash when ReturnGroup is null
Always checking if ReturnGroup is not null before testing ReturnGroup::isExist()
This commit is contained in:
parent
4d9bcbe6b7
commit
3b05e2d30d
@ -68,9 +68,9 @@ end
|
|||||||
-- @treturn Group
|
-- @treturn Group
|
||||||
function CLIENT:ClientGroup()
|
function CLIENT:ClientGroup()
|
||||||
--trace.f(self.ClassName)
|
--trace.f(self.ClassName)
|
||||||
local GroupExists = Group.getByName( self.ClientName )
|
local ReturnGroup = Group.getByName( self.ClientName )
|
||||||
if GroupExists::isExist() then
|
if ReturnGroup and ReturnGroup::isExist() then
|
||||||
return GroupExists
|
return ReturnGroup
|
||||||
else
|
else
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user