Aurora

Aurora

394k Downloads

[Bug]Characters with no pets getting PetPaperDollFrame error

Jeremy7600 opened this issue ยท 0 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Game Client

Wrath Classic

Current Behavior

131x Aurora/Skin/util.lua:64: attempt to index field '?' (a nil value)
[string "@Aurora/Skin/util.lua"]:64: in function PositionRelative' [string "@Aurora/Skin/Interface_Wrath/FrameXML/PetPaperDollFrame.lua"]:31: in function <.../Skin/Interface_Wrath/FrameXML/PetPaperDollFrame.lua:15> [string "=[C]"]: in function PetPaperDollFrame_UpdateTabs'
[string "@Interface_Wrath/FrameXML/PetPaperDollFrame.lua"]:133: in function <Interface_Wrath/FrameXML/PetPaperDollFrame.lua:129>

Locals:
point = "BOTTOMLEFT"
anchor = Texture {
0 =
}
relPoint = "TOPLEFT"
x = 20
y = 1
gap = 1
direction = "Right"
widgets =

{
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field '?' (a nil value)"

Expected Behavior

No error.

Steps To Reproduce

  1. Log in to character without any pets, for example a new toon
  2. Error occurs on login.

Additional context

I am able to prevent it with this if statement wrapped around the call to PositionRelative so it doesn't get called when there's an empty table

if ( _G.HasPetUI() or ( _G.GetNumCompanions("CRITTER") > 0 ) or (_G.GetNumCompanions("MOUNT") > 0) ) then
Util.PositionRelative("BOTTOMLEFT", _G.CompanionModelFrame._bg, "TOPLEFT", 20, 1, 1, "Right", tabs)
end