Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search needs nil protection #361

Closed
zeptognome opened this issue May 7, 2024 · 2 comments
Closed

search needs nil protection #361

zeptognome opened this issue May 7, 2024 · 2 comments
Assignees
Labels
bug Something isn't working triage

Comments

@zeptognome
Copy link
Collaborator

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

@zeptognome
Copy link
Collaborator Author

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

image

@zeptognome
Copy link
Collaborator Author

search has been rewritten closing as like no longer possible

@github-project-automation github-project-automation bot moved this from To Triage to Released in BetterBags Issue Tracker Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
Archived in project
Development

No branches or pull requests

2 participants