bags: check for textures before using them

This commit is contained in:
shagu
2020-01-17 22:18:44 +01:00
parent 869f7d318a
commit 087535f66b
+1 -1
View File
@@ -579,7 +579,7 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function ()
local spellTexture = GetSpellTexture(spellIndex, BOOKTYPE_SPELL)
-- scan for disenchant and pick lock
for texture, widget in pairs(knownInventorySpellTextures) do
if strfind(spellTexture, texture) and pfUI.bag.right[widget.frame] then
if spellTexture and texture and strfind(spellTexture, texture) and pfUI.bag.right[widget.frame] then
pfUI.bag.right[widget.frame]:SetID(spellIndex)
end
end