search needs nil protection
zeptognome opened this issue ยท 2 comments
Addon Version
v0.1.42
World of Warcraft Version
Retail
Describe the bug
5x BetterBags/frames/item.lua:103: attempt to index local 'data' (a nil value)
[string "@BetterBags/frames/item.lua"]:103: in function <BetterBags/frames/item.lua:101>
[string "@BetterBags/frames/item.lua"]:163: in function UpdateSearch' [string "@BetterBags/frames/bag.lua"]:198: in function
Search'
[string "@BetterBags/frames/search.lua"]:62: in function `UpdateSearch'
[string "@BetterBags/frames/search.lua"]:150: in function <BetterBags/frames/search.lua:149>
Locals:
filter = "c"
data = nil
Steps to reproduce
v0.1.42 on retail with section view after opening a researcher under fire reward that contained a 'cache' that I opened while there was text in the search bar - all stacking options off. bags 90% full
function itemFrame.itemProto:UpdateSearch(text)
if self.slotkey == nil then return end
local data = items:GetItemDataFromSlotKey(self.slotkey)
if not data then print("Nil data for: ", self.slotkey, " Type: ", type(self.slotkey)) end
if not text or text == "" then
self.button:SetMatchesSearch(true)
return
end