From d149b60b6cff1c2490e39031ca24bc9cc7a67d2e Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Wed, 5 Aug 2026 21:57:00 -0500 Subject: [PATCH] Handle missing C_Macro.CreateMacro API Add guards to detect if C_Macro.CreateMacro is unavailable. The macroicons module now returns early if the API doesn't exist, and turtle-wow.lua uses the alternative Blizzard_MacroUI fallback path in such cases. --- modules/macroicons.lua | 1 + modules/turtle-wow.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/macroicons.lua b/modules/macroicons.lua index f5c3cc4e..c6257bb1 100644 --- a/modules/macroicons.lua +++ b/modules/macroicons.lua @@ -7,6 +7,7 @@ -- string -- so arbitrary icons (including index-less INV_* item icons) persist -- on both the modern (Turtle/Octo) and stock-vanilla macro UIs. The surrounding -- MacroFrame (list + body editor) is Blizzard's, already skinned elsewhere. +if not C_Macro or not C_Macro.CreateMacro then return end pfUI:RegisterModule("macroicons", function () HookAddonOrVariable("Blizzard_MacroUI", function() local QUESTION_MARK = "INTERFACE\\ICONS\\INV_MISC_QUESTIONMARK" diff --git a/modules/turtle-wow.lua b/modules/turtle-wow.lua index 2f229023..245f9402 100644 --- a/modules/turtle-wow.lua +++ b/modules/turtle-wow.lua @@ -355,7 +355,7 @@ pfUI:RegisterModule("turtle-wow", function () end end) - if C.disabled["macroicons"] == "1" then + if C.disabled["macroicons"] == "1" or not C_Macro or not C_Macro.CreateMacro then HookAddonOrVariable("Blizzard_MacroUI", function() if type(UpdateMacroIconFilenames) ~= "function" then return end function _G.UpdateMacroIconFilenames()