Guard against a db init issue
James Whitehead II [05-03-07 - 11:28]
Guard against a db init issue
diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index d6dcb63..a7812cf 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -553,7 +553,8 @@ function OnAttributeChanged(frame, name, value)
frame.manabar:SetValue(UnitMana(unit))
-- Show/Hide the mana bar depending on unit power type
- if UnitPowerType(unit) == 0 and frame.options.manaheight > 0 then
+ local manaheight = frame.options.manaheight or 0
+ if UnitPowerType(unit) == 0 and manaheight > 0 then
frame.manabar:Show()
elseif self.db.profile.showmanaonly then
frame.manabar:Hide()