Fix possible nil when portaling
This commit is contained in:
parent
ce23a9097a
commit
7da426ce64
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue