Check for nil. (#8)

This commit is contained in:
salt-die
2022-11-01 15:40:20 -05:00
committed by GitHub
parent 8f4463b46a
commit 2455c076b0
+1
View File
@@ -309,6 +309,7 @@ S:AddCallbackForAddon("WIM", "WIM", function()
WIM.constants.classes.GetColoredNameByChatEvent = function(event, ...)
local player, guid = select(2, ...), select(12, ...)
if not guid then return player end
local _, class = GetPlayerInfoByGUID(guid)
local color = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
if color then