From a5b67340ff039d22627647979aff33589ce23480 Mon Sep 17 00:00:00 2001 From: Florian Berthold Date: Fri, 29 May 2026 10:43:54 +0200 Subject: [PATCH] fix(Config): guard InterfaceOptions, fall back to AceConfigDialog on CoA --- Mapster/Config.lua | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Mapster/Config.lua b/Mapster/Config.lua index 464d48b..e0da2d2 100644 --- a/Mapster/Config.lua +++ b/Mapster/Config.lua @@ -162,11 +162,17 @@ local function getOptions() return options end -local function optFunc() - -- open the profiles tab before, so the menu expands - InterfaceOptionsFrame_OpenToCategory(Mapster.optionsFrames.Profiles) - InterfaceOptionsFrame_OpenToCategory(Mapster.optionsFrames.Mapster) - InterfaceOptionsFrame:Raise() +local function optFunc() + -- CoA: InterfaceOptionsFrame_OpenToCategory / InterfaceOptionsFrame are nil on 3.3.5; + -- fall back to AceConfigDialog which works on all clients. + if InterfaceOptionsFrame_OpenToCategory then + -- open the profiles tab before, so the menu expands + InterfaceOptionsFrame_OpenToCategory(Mapster.optionsFrames.Profiles) + InterfaceOptionsFrame_OpenToCategory(Mapster.optionsFrames.Mapster) + if InterfaceOptionsFrame then InterfaceOptionsFrame:Raise() end + else + LibStub("AceConfigDialog-3.0"):Open("Mapster") + end end function Mapster:SetupOptions()