summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/vm/function.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/vm/function.lua b/server/src/vm/function.lua
index 6eb6fc1f..2322fa70 100644
--- a/server/src/vm/function.lua
+++ b/server/src/vm/function.lua
@@ -56,6 +56,9 @@ function mt:saveLocal(name, loc)
if loc.type ~= 'local' then
error('saveLocal必须是local')
end
+ if not loc:getSource() then
+ return
+ end
local old = self:loadLocal(name)
if old then
loc:shadow(old)