From 7da426ce64739a0c70085b9114306b7b8775642c Mon Sep 17 00:00:00 2001 From: Robin Date: Sat, 6 Feb 2021 19:10:40 +0100 Subject: [PATCH] Fix possible nil when portaling --- Moduls/autogroup.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Moduls/autogroup.lua b/Moduls/autogroup.lua index c4a91ca..2334387 100644 --- a/Moduls/autogroup.lua +++ b/Moduls/autogroup.lua @@ -13,9 +13,11 @@ local defaults = { local function myGuild(unitname) for i=1,GetNumGuildMembers() do local rostername, _, _, _, _, _, _, _, online = GetGuildRosterInfo(i) - local shortname = strsplit("-",rostername,2) - if(online and (rostername == unitname or shortname == unitname)) then - return true + if(rostername) then + local shortname = strsplit("-",rostername,2) + if(online and (rostername == unitname or shortname == unitname)) then + return true + end end end return false