summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-26 10:35:51 +0800
committersumneko <sumneko@hotmail.com>2019-04-26 10:35:51 +0800
commit91f13fca126d2a71d844245822517d172ec95478 (patch)
tree9a4dd3103ac48331adb837bf137e5b2d23e7c02a /server
parent93a7bec20cdf6e59b691a0b52ab4d54862fbf39b (diff)
downloadlua-language-server-91f13fca126d2a71d844245822517d172ec95478.zip
修正报错
Diffstat (limited to 'server')
-rw-r--r--server/src/vm/source.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/src/vm/source.lua b/server/src/vm/source.lua
index 7f355c6b..59d5d66d 100644
--- a/server/src/vm/source.lua
+++ b/server/src/vm/source.lua
@@ -17,6 +17,13 @@ function mt:bindLocal(loc, action)
self._action = action
loc:addInfo(action, self)
else
+ if not self._bindLocal then
+ return nil
+ end
+ if not self._bindLocal:getSource() then
+ self._bindLocal = nil
+ return nil
+ end
return self._bindLocal
end
end