extensions/magic_sandbox: Never wrap nil into a sandbox wrapper instance (it's very confusing)
This commit is contained in:
parent
f1371650b9
commit
92f63f2bbb
@ -15,6 +15,9 @@ function M.wrap_class(type_name, def)
|
||||
class_meta.inherited_from_in_sandbox = def.inherited_from_in_sandbox
|
||||
class_meta.inherited_from_by_wrapper = def.inherited_from_by_wrapper
|
||||
class_meta.wrap = function(unsafe)
|
||||
if unsafe == nil then
|
||||
error("magic_sandbox: class_meta.wrap(): Wrapping nil is not allowed")
|
||||
end
|
||||
local safe = {}
|
||||
local meta = {
|
||||
unsafe = unsafe,
|
||||
|
Loading…
x
Reference in New Issue
Block a user