Skip to content

Commit 6470a02

Browse files
committed
Revert "oUF: remove cutaway pcall here"
This reverts commit eb4b489.
1 parent 49f011d commit 6470a02

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ElvUI_Libraries/Game/Shared/oUF_Plugins/oUF_Cutaway.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ local function Health_PreUpdate(self, unit)
9494
if not okTap or tapDenied then return end
9595

9696
local GetHealthMax = element.GetHealthMax or UnitHealthMax
97-
local maxV = GetHealthMax(unit)
98-
if Shared_UpdateCheckReturn(self, element, PRE, nil, maxV, unit) then
97+
local okMax, maxV = pcall(GetHealthMax, unit)
98+
if not okMax or Shared_UpdateCheckReturn(self, element, PRE, nil, maxV, unit) then
9999
return
100100
end
101101

@@ -137,8 +137,8 @@ local function Power_PreUpdate(self, unit)
137137
if not okTap or tapDenied then return end
138138

139139
local GetPowerMax = element.GetPowerMax or UnitPowerMax
140-
local maxV = GetPowerMax(unit)
141-
if Shared_UpdateCheckReturn(self, element, PRE, nil, maxV, unit) then
140+
local ok, maxV = pcall(GetPowerMax, unit)
141+
if not ok or Shared_UpdateCheckReturn(self, element, PRE, nil, maxV, unit) then
142142
return
143143
end
144144

0 commit comments

Comments
 (0)