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 = {}
|
||||
|
||||
for name in pairs(HideCoADB.profiles) do
|
||||
if name ~= "Default" then
|
||||
table.insert(names, name)
|
||||
if HideCoADB and HideCoADB.profiles then
|
||||
for name in pairs(HideCoADB.profiles) do
|
||||
if name ~= "Default" then
|
||||
table.insert(names, name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -182,7 +184,7 @@ UIDropDownMenu_Initialize(profileDropDown, function(self, level)
|
||||
info.text = name
|
||||
info.value = name
|
||||
info.func = ProfileDropDown_OnClick
|
||||
info.checked = (HideCoADB.selectedProfile == name)
|
||||
info.checked = HideCoADB and (HideCoADB.selectedProfile == name)
|
||||
|
||||
UIDropDownMenu_AddButton(info, level)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user