summaryrefslogtreecommitdiff
path: root/script-beta
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta')
-rw-r--r--script-beta/vm/eachRef.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script-beta/vm/eachRef.lua b/script-beta/vm/eachRef.lua
index 0d772209..d6ca819b 100644
--- a/script-beta/vm/eachRef.lua
+++ b/script-beta/vm/eachRef.lua
@@ -248,7 +248,7 @@ end
--- 自己作为函数的返回值
local function asReturn(source, callback)
local parent = source.parent
- if parent.type ~= 'return' then
+ if not parent or parent.type ~= 'return' then
return
end
local func = guide.getParentFunction(source)