This repository has been archived by the owner on Jun 2, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: Don't crash when frames lack castbar table
The code assumed that every frame always had a "castbar" table, and then it checked "if db.castbar.enable"... (db = the frame's table). That failed and caused Lua errors (and aborted the profile loading) since the "castbar" table does *not* always exist, thus causing an "attempt to access nil field" error. Fixed to first verify that a "castbar" table exists before attempting to check if the "enable" property exists! --- Here's a typical example of a unitframe with no "castbar" table: ``` ["player"] = { ["swingbar"] = { ["color"] = { ["b"] = 0.6470588235294118, ["g"] = 0.6, ["r"] = 0.1686274509803922, }, ["text"] = { ["font"] = "PT Sans Narrow", ["fontSize"] = 14, ["fontOutline"] = "OUTLINE", }, }, ["aurabar"] = { ["maxBars"] = 4, }, ["power"] = { ["height"] = 14, }, ["raidicon"] = { ["attachTo"] = "RIGHT", ["size"] = 26, ["xOffset"] = 29, ["yOffset"] = 12, }, }, ```
- Loading branch information