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,11 +90,12 @@ local function get_object_from_string(obj)
return obj, true
elseif type(obj) == "string" then
local obj_table = rawget(_G, obj)
return obj_table, (type(obj_table) == "table")
else
return obj, false
if obj_table then
return obj_table, true
end
end
return obj, false
end
-- VT1 hooked everything using a "Obj.Method" string
-- Add backward compatibility for that format.