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
|
||||
function CLIENT:ClientGroup()
|
||||
--trace.f(self.ClassName)
|
||||
local GroupExists = Group.getByName( self.ClientName )
|
||||
if GroupExists::isExist() then
|
||||
return GroupExists
|
||||
local ReturnGroup = Group.getByName( self.ClientName )
|
||||
if ReturnGroup and ReturnGroup::isExist() then
|
||||
return ReturnGroup
|
||||
else
|
||||
return nil
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user