skins: check score and quality before comparing

This commit is contained in:
shagu
2024-04-21 12:33:47 +02:00
parent ba5e0abecf
commit 5dda502912
+1 -1
View File
@@ -110,7 +110,7 @@ pfUI:RegisterSkin("Character", "vanilla:tbc", function ()
local itemLevel = ShaguScore.Database[tonumber(itemID)] or 0
local _, _, quality, _, _, _, _, _, itemSlot, _ = GetItemInfo(itemID)
local score = ShaguScore:Calculate(itemSlot, quality, itemLevel)
if score > 0 and quality > 0 then
if score and score > 0 and quality and quality > 0 then
local r,g,b = GetItemQualityColor(quality)
slot.scoreText:SetText(score)
slot.scoreText:SetTextColor(r, g, b, 1)