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:
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: