From 3127283067dd844af9c7a5dbb8cfad0c407b9469 Mon Sep 17 00:00:00 2001 From: yani9o <90964575+yani9o@users.noreply.github.com> Date: Mon, 15 Sep 2025 22:32:56 +0200 Subject: [PATCH] Fix error if using @focus and no pfUI installed. Now just skips the updated part instead of throwing this error (tested): Interface\AddOns\SuperCleveRoidMacros\Core.lua:1108: attempt to index global 'pfUI' (a nil value) --- Core.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core.lua b/Core.lua index ef9f0e8..0552795 100644 --- a/Core.lua +++ b/Core.lua @@ -1105,7 +1105,7 @@ function CleveRoids.DoWithConditionals(msg, hook, fixEmptyTargetFunc, targetBefo needRetarget = false else -- return false if pfUI is installed and no focus is set instead of "invalid target" - if (pfUI.uf.focus.label == nil or pfUI.uf.focus.label == "") and pfUI then return false end + if pfUI and (pfUI.uf.focus.label == nil or pfUI.uf.focus.label == "") then return false end -- If the direct UnitID isn't found, fall back to the original (but likely failing) method of targeting by name. if not CleveRoids.TryTargetFocus() then UIErrorsFrame:AddMessage(SPELL_FAILED_BAD_TARGETS, 1.0, 0.0, 0.0, 1.0)