summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-20 11:18:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-20 11:18:48 +0800
commite24fe56cef46f073b94489a7cbf87973a44d8fb8 (patch)
treee8987ffb6c7744e210bc1cb40b91450519b2ce11 /server
parent1e8fd4412e151d2e02b3f3744f667e508cb20735 (diff)
downloadlua-language-server-e24fe56cef46f073b94489a7cbf87973a44d8fb8.zip
判个空
Diffstat (limited to 'server')
-rw-r--r--server/src/core/completion.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua
index d02897c7..fcea333d 100644
--- a/server/src/core/completion.lua
+++ b/server/src/core/completion.lua
@@ -245,6 +245,9 @@ end
local function searchCloseGlobal(vm, source, word, callback)
local loc = source:bindLocal()
+ if not loc then
+ return
+ end
local close = loc:close()
-- 因为闭包的关系落在局部变量finish到close范围内的全局变量一定能访问到该局部变量
for _, src in ipairs(vm.sources) do