diff --git a/Options.lua b/Options.lua index 63a03df..691c7ca 100644 --- a/Options.lua +++ b/Options.lua @@ -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)