summaryrefslogtreecommitdiff
path: root/server/src/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-15 15:40:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-15 15:40:28 +0800
commitf65de4fabbe2b8b1a66a13661adc26f9b93f5d80 (patch)
treec477127bcb547e5dc2f3ec3958adf9ac4af49eaf /server/src/vm
parent212360dd88275317c2aa63252538f9cdae1db3b7 (diff)
downloadlua-language-server-f65de4fabbe2b8b1a66a13661adc26f9b93f5d80.zip
判空
Diffstat (limited to 'server/src/vm')
-rw-r--r--server/src/vm/local.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/vm/local.lua b/server/src/vm/local.lua
index 6ddaac03..8f9ee3e4 100644
--- a/server/src/vm/local.lua
+++ b/server/src/vm/local.lua
@@ -109,6 +109,9 @@ end
function mt:shadow(old)
if not old then
+ if not self._shadow then
+ return nil
+ end
for i = #self._shadow, 1, -1 do
local loc = self._shadow[i]
if not loc:getSource() then