Avoid a crash when ReturnGroup is null

Always checking if ReturnGroup is not null before testing
ReturnGroup::isExist()
This commit is contained in:
svenvandevelde 2015-10-25 10:48:46 +01:00
parent 4d9bcbe6b7
commit 3b05e2d30d

View File

@ -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