Skip to content

Commit

Permalink
C_Timer wrapper: If we don't know where we are, return real C_Timer
Browse files Browse the repository at this point in the history
Can happen because all aura_environemnts share the same exec_env

Fixes: #3925
  • Loading branch information
InfusOnWoW committed Oct 26, 2022
1 parent beb59eb commit e6cb6e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions WeakAuras/AuraEnvironment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,9 @@ local exec_env_custom = setmetatable({},
elseif k == "DebugPrint" then
return DebugPrint
elseif k == "C_Timer" then
return Private.AuraEnvironmentWrappedSystem.Get("C_Timer",
current_aura_env.id, current_aura_env.cloneId)
return current_aura_env and Private.AuraEnvironmentWrappedSystem.Get("C_Timer",
current_aura_env.id, current_aura_env.cloneId)
or C_Timer
elseif blockedFunctions[k] then
blocked(k)
return function() end
Expand Down

0 comments on commit e6cb6e4

Please sign in to comment.