diff modules/State.lua @ 134:d186e041ca14

Added stance bar support
author Flick <flickerstreak@gmail.com>
date Tue, 17 Mar 2009 23:38:38 +0000
parents 5c189f44e776
children 42cade25d40d
line wrap: on
line diff
--- a/modules/State.lua	Tue Mar 17 21:55:15 2009 +0000
+++ b/modules/State.lua	Tue Mar 17 23:38:38 2009 +0000
@@ -376,7 +376,7 @@
       -- sort by icon since it's locale-independent
     for i = 1, GetNumShapeshiftForms() do
       local icon, name, active = GetShapeshiftFormInfo(i)
-      -- if it's the current form, the icon is wrong (Ability_Spell_WispSplode)
+      -- if it's the current form, the icon is wrong (Spell_Nature_WispSplode)
       -- so capture it from the spell info directly
       if active then
         local _1, _2
@@ -1342,7 +1342,8 @@
 -- Export methods to Bar class --
 
 function ReAction.Bar:GetState()
-  return GetManagedEnvironment(self:GetFrame()).state
+  local env = GetManagedEnvironment(self:GetFrame())
+  return env and env.state
 end
 
 ReAction.Bar.GetStateProperty = GetProperty