eqcompare: prevent an error on missing target stat

This commit is contained in:
Road-block
2018-11-02 09:56:52 +01:00
committed by shagu
parent 35afb39970
commit 755eb617ec
+4 -2
View File
@@ -102,8 +102,10 @@ pfUI:RegisterModule("eqcompare", function ()
end
else
-- this attribute doesnt exist in target
if not strfind(v.widget:GetText(), "|cff88ff88") and not strfind(v.widget:GetText(), "|cffff8888") then
v.widget:SetText(v.widget:GetText() .. "|cff88ff88 (+" .. v.value .. ")")
if v.widget and v.widget:GetText() then
if not strfind(v.widget:GetText(), "|cff88ff88") and not strfind(v.widget:GetText(), "|cffff8888") then
v.widget:SetText(v.widget:GetText() .. "|cff88ff88 (+" .. v.value .. ")")
end
end
end
end