diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-29 21:53:39 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-29 21:53:39 +0800 |
commit | 146ea3c19fc1fb2244cc305fbf4fae0ed266b976 (patch) | |
tree | cc2f0bd0c5b31a9553bbd3346127addc3a4be9bd /server/src | |
parent | bb56cb2c21bf6a6c7a6c3bf6bb069bc69c1f903c (diff) | |
download | lua-language-server-146ea3c19fc1fb2244cc305fbf4fae0ed266b976.zip |
先判空吧,等以后重构
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/vm/function.lua | 3 |
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) |