LUA Error when Collected -> Usable Only filter on in no mount area
travisneids opened this issue ยท 2 comments
Did some testing on the error below and it seems to be related to having the filter "Collected -> Usable Only" on when in an area mounts are not usable (Maw & some covenant areas).
PR incoming with a possible solution for now until you find a more elegant way if necessary.
Time: Mon Jan 18 09:28:27 2021
Count: 1
Stack: ...AddOns\MountJournalEnhanced\MountJournalEnhanced.lua:50: attempt to index field '?' (a nil value)
[string "=[C]"]: ?
[string "@Interface\AddOns\MountJournalEnhanced\MountJournalEnhanced.lua"]:50: in function <...AddOns\MountJournalEnhanced\MountJournalEnhanced.lua:30>
[string "@Interface\AddOns\MountJournalEnhanced\MountJournalEnhanced.lua"]:80: in function `GetDisplayedMountInfo'
[string "@Interface\AddOns\Blizzard_Collections\Blizzard_MountCollection.lua"]:617: in function `MountJournal_Select'
[string "@Interface\AddOns\Blizzard_Collections\Blizzard_MountCollection.lua"]:363: in function `MountJournal_FullUpdate'
[string "@Interface\AddOns\Blizzard_Collections\Blizzard_MountCollection.lua"]:371: in function <...ns\Blizzard_Collections\Blizzard_MountCollection.lua:370>
[string "=[C]"]: in function `Show'
[string "@Interface\FrameXML\UIParent.lua"]:2910: in function `SetUIPanel'
[string "@Interface\FrameXML\UIParent.lua"]:2755: in function `ShowUIPanel'
[string "@Interface\FrameXML\UIParent.lua"]:2623: in function <Interface\FrameXML\UIParent.lua:2619>
[string "=[C]"]: in function `SetAttribute'
[string "@Interface\FrameXML\UIParent.lua"]:3468: in function `ShowUIPanel'
[string "@Interface\FrameXML\UIParent.lua"]:1093: in function `SetCollectionsJournalShown'
[string "@Interface\FrameXML\UIParent.lua"]:1083: in function `ToggleCollectionsJournal'
[string "TOGGLECOLLECTIONSPETJOURNAL"]:1: in function <[string "TOGGLECOLLECTIONSPETJOURNAL"]:1>
Locals:
Thank you for your report and PR.
I was able to reproduce this bug. It's basically an out of bound error with the indexMap.
In your described situation, you would basically have an empty list. But the UI tries to select the first entry (index=1). That results in this error. :(
I'm going to decline your PR though. It needs some more changes to fix this. Don't worry, I got this. :)
The fix is going to be in the next version (probably 2.10)