coa.2: guard CoA data shapes (custom classes, comm-seeded records, ungeared chars)
release / release (push) Successful in 5s
release / release (push) Successful in 5s
Fixes login/UI crashes on Vol'jin - CoA Beta: - DataStore_Inventory: GetAverageItemLevel returns 0 not nil (Altoholic sort + AccountSummary iLvl format); guard login AIL broadcast and 0/0 average. - DataStore_Pets: GetNumPets returns 0 for unscanned companion table instead of assert-crashing TabCharacters. - DataStore_Characters: GetColoredCharacterName tolerates nil name. - Altoholic/Characters.lua: GetLineType returns nil for stale line id. Stamp -coa.2 + X-Edited-By: Exiles on touched addons; README CoA changelog.
This commit is contained in:
@@ -70,7 +70,7 @@ local function _GetPets(character, companionType)
|
||||
end
|
||||
|
||||
local function _GetNumPets(pets)
|
||||
assert(type(pets) == "table") -- this is the pointer to a pet table, obtained through GetPets()
|
||||
if type(pets) ~= "table" then return 0 end -- CoA: char may have no scanned CRITTER/MOUNT table yet; upstream assert() crashed TabCharacters
|
||||
return #pets
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user