coa.13: fix character-view crash on chars with >2 professions
release / release (push) Successful in 5s
release / release (push) Successful in 5s
SetItemButtonTexture now guards a nil IconTexture (was crashing whenever a button didn't exist). UpdateViewIcons profession loop stops at the last existing _ProfN button instead of indexing a nil frame; added _Prof3..8 so CoA chars (which can know many professions) show more than 2. This was blocking the character detail view from rendering when you clicked a char in the Account Summary.
This commit is contained in:
@@ -495,11 +495,12 @@ function addon:SetItemButtonTexture(button, texture, width, height)
|
||||
height = height or 36
|
||||
|
||||
local itemTexture = _G[button.."IconTexture"]
|
||||
|
||||
if not itemTexture then return end -- CoA: guard buttons that don't exist / lack an IconTexture region (e.g. iterating more professions than there are _ProfN buttons)
|
||||
|
||||
itemTexture:SetWidth(width);
|
||||
itemTexture:SetHeight(height);
|
||||
itemTexture:SetAllPoints(_G[button]);
|
||||
|
||||
|
||||
SetItemButtonTexture(_G[button], texture)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user