Fix possible nil when portaling
This commit is contained in:
parent
ce23a9097a
commit
7da426ce64
|
@ -13,9 +13,11 @@ local defaults = {
|
||||||
local function myGuild(unitname)
|
local function myGuild(unitname)
|
||||||
for i=1,GetNumGuildMembers() do
|
for i=1,GetNumGuildMembers() do
|
||||||
local rostername, _, _, _, _, _, _, _, online = GetGuildRosterInfo(i)
|
local rostername, _, _, _, _, _, _, _, online = GetGuildRosterInfo(i)
|
||||||
local shortname = strsplit("-",rostername,2)
|
if(rostername) then
|
||||||
if(online and (rostername == unitname or shortname == unitname)) then
|
local shortname = strsplit("-",rostername,2)
|
||||||
return true
|
if(online and (rostername == unitname or shortname == unitname)) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue