summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/core/diagnostics.lua2
1 files changed, 1 insertions, 1 deletions
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,