We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49f011d commit 6470a02Copy full SHA for 6470a02
1 file changed
ElvUI_Libraries/Game/Shared/oUF_Plugins/oUF_Cutaway.lua
@@ -94,8 +94,8 @@ local function Health_PreUpdate(self, unit)
94
if not okTap or tapDenied then return end
95
96
local GetHealthMax = element.GetHealthMax or UnitHealthMax
97
- local maxV = GetHealthMax(unit)
98
- if Shared_UpdateCheckReturn(self, element, PRE, nil, maxV, unit) then
+ local okMax, maxV = pcall(GetHealthMax, unit)
+ if not okMax or Shared_UpdateCheckReturn(self, element, PRE, nil, maxV, unit) then
99
return
100
end
101
@@ -137,8 +137,8 @@ local function Power_PreUpdate(self, unit)
137
138
139
local GetPowerMax = element.GetPowerMax or UnitPowerMax
140
- local maxV = GetPowerMax(unit)
141
+ local ok, maxV = pcall(GetPowerMax, unit)
+ if not ok or Shared_UpdateCheckReturn(self, element, PRE, nil, maxV, unit) then
142
143
144
0 commit comments