Guard profile dropdown against HideCoADB not being ready yet at load time
This commit is contained in:
+6
-4
@@ -153,9 +153,11 @@ local function GetProfileNames()
|
|||||||
|
|
||||||
local names = {}
|
local names = {}
|
||||||
|
|
||||||
for name in pairs(HideCoADB.profiles) do
|
if HideCoADB and HideCoADB.profiles then
|
||||||
if name ~= "Default" then
|
for name in pairs(HideCoADB.profiles) do
|
||||||
table.insert(names, name)
|
if name ~= "Default" then
|
||||||
|
table.insert(names, name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -182,7 +184,7 @@ UIDropDownMenu_Initialize(profileDropDown, function(self, level)
|
|||||||
info.text = name
|
info.text = name
|
||||||
info.value = name
|
info.value = name
|
||||||
info.func = ProfileDropDown_OnClick
|
info.func = ProfileDropDown_OnClick
|
||||||
info.checked = (HideCoADB.selectedProfile == name)
|
info.checked = HideCoADB and (HideCoADB.selectedProfile == name)
|
||||||
|
|
||||||
UIDropDownMenu_AddButton(info, level)
|
UIDropDownMenu_AddButton(info, level)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user