From 3b05e2d30d4a351b2470f06919a2759cea33095c Mon Sep 17 00:00:00 2001 From: svenvandevelde Date: Sun, 25 Oct 2015 10:48:46 +0100 Subject: [PATCH] Avoid a crash when ReturnGroup is null Always checking if ReturnGroup is not null before testing ReturnGroup::isExist() --- Client.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client.lua b/Client.lua index 1ff546e4e..32ead5cd0 100644 --- a/Client.lua +++ b/Client.lua @@ -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