Fix issue where hooks arent delayed properly.

Under certain conditions, get_object_from_string could return that a hook needs to be delayed, but also return nil instead of the string.
This commit is contained in:
FireSiku 2018-06-05 21:54:35 -04:00
parent f195b10e7d
commit 099b9db187

View file

@ -90,10 +90,11 @@ local function get_object_from_string(obj)
return obj, true return obj, true
elseif type(obj) == "string" then elseif type(obj) == "string" then
local obj_table = rawget(_G, obj) local obj_table = rawget(_G, obj)
return obj_table, (type(obj_table) == "table") if obj_table then
else return obj_table, true
return obj, false
end end
end
return obj, false
end end
-- VT1 hooked everything using a "Obj.Method" string -- VT1 hooked everything using a "Obj.Method" string