From 5818fc66bc188b97057e687d951255753c8fb654 Mon Sep 17 00:00:00 2001 From: Narcasung Date: Tue, 7 Jul 2026 20:40:56 +0200 Subject: [PATCH] Guard profile dropdown against HideCoADB not being ready yet at load time --- Options.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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)