From 7e9154e64d2a743903b1f9400bd254a039816ca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 23 Sep 2019 18:56:25 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/diagnostics.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua index 0e0d85ba..e5fd0ba5 100644 --- a/server/src/core/diagnostics.lua +++ b/server/src/core/diagnostics.lua @@ -563,7 +563,7 @@ function mt:searchGlobalInNilEnv(callback) return end local parentSource = source:get 'parent' :getSource() - if parentSource.type == 'nil' then + if parentSource and parentSource.type == 'nil' then callback(source.start, source.finish, { { start = parentSource.start, -- cgit v1.2.3