summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-13 14:30:31 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-13 14:30:31 +0800
commita546d8a79f795415cf5875fe58483b9bd9ea9d3b (patch)
tree7b3fac5f41ac7d2ce0b95ecedd29847cc566af44
parentc905dd6c7b648864de9d4c714c330fcd192cadd6 (diff)
downloadlua-language-server-a546d8a79f795415cf5875fe58483b9bd9ea9d3b.zip
修正一个报错
-rw-r--r--server/src/service.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index 4279e2f9..4a52b5d3 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -340,7 +340,9 @@ function mt:compileVM(uri)
if obj.vm then
obj.vm:remove()
end
- CachedVM[vm] = true
+ if vm then
+ CachedVM[vm] = true
+ end
obj.vm = vm
obj.vmCost = os.clock() - clock
obj.vmVersion = version