Skip to content

Commit ff52b98

Browse files
danvernonclaude
andcommitted
fix(party): set oUF-guessUnit fallback to prevent nil index in oUF
oUF ouf.lua:270 calls objectUnit:match() which crashes when both the unit parameter and oUF-guessUnit attribute are nil. This happens in solo test mode when the header creates frames with no real party member. Set a 'party' fallback in the initialConfigFunction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c20aa60 commit ff52b98

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

EllesmereUIUnitFrames/EllesmereUIPartyFrames.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ local function SpawnPartyHeader()
404404
"oUF-initialConfigFunction", ([[
405405
self:SetWidth(%d)
406406
self:SetHeight(%d)
407+
-- Ensure oUF-guessUnit is never nil (oUF crashes at ouf.lua:270 otherwise)
408+
if(not self:GetAttribute('oUF-guessUnit')) then
409+
self:SetAttribute('oUF-guessUnit', 'party')
410+
end
407411
]]):format(settings.frameWidth or 160, (settings.healthHeight or 36) + ((settings.powerPosition ~= "none") and (settings.powerHeight or 4) or 0)),
408412
}
409413

0 commit comments

Comments
 (0)