Guard profile dropdown against HideCoADB not being ready yet at load time

This commit is contained in:
2026-07-07 20:40:56 +02:00
parent ecaf3a7cb9
commit 5818fc66bc
+6 -4
View File
@@ -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)