From 9a7980fa6b4bc79be946be1d4c00777de019f1a2 Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 11 Nov 2016 08:57:55 +0100 Subject: [PATCH] buff: do not parse empty itemlinks --- modules/buff.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/buff.lua b/modules/buff.lua index 3aa3dc7a..bfa348e1 100644 --- a/modules/buff.lua +++ b/modules/buff.lua @@ -62,6 +62,7 @@ pfUI:RegisterModule("buff", function () if buff:GetID() == 16 then local link = GetInventoryItemLink("player", 16) + if not link then break end local _, _, itemLink = string.find(link, "(item:%d+:%d+:%d+:%d+)") local _, _, itemRarity, itemLevel, _, _, _, itemEquipLoc, _ = GetItemInfo(itemLink) if itemRarity then buff:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end @@ -74,6 +75,7 @@ pfUI:RegisterModule("buff", function () end elseif buff:GetID() == 17 then local link = GetInventoryItemLink("player", 17) + if not link then break end local _, _, itemLink = string.find(link, "(item:%d+:%d+:%d+:%d+)") local _, _, itemRarity, itemLevel, _, _, _, itemEquipLoc, _ = GetItemInfo(itemLink) if itemRarity then buff:SetBackdropBorderColor(GetItemQualityColor(itemRarity)) end