Safe hooks are now truly safe: Handler functions are xpcall'd
This commit is contained in:
parent
0380e9f4a8
commit
dd31894cd2
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ local function create_specialized_hook(self, orig, handler, hook_type)
|
||||||
elseif hook_type == HOOK_TYPE_SAFE then
|
elseif hook_type == HOOK_TYPE_SAFE then
|
||||||
func = function(...)
|
func = function(...)
|
||||||
if hook_data.active then
|
if hook_data.active then
|
||||||
return handler(...)
|
vmf.xpcall_no_return_values(self, "(safe_hook)", handler, ...)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue