From f8104cc646f3b374c98b5c22f91ec75d5731b445 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, 4 Jul 2022 20:48:41 +0800 Subject: fix #1275 check nil --- script/vm/compiler.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script/vm/compiler.lua') diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 37042d76..e361d706 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -1012,7 +1012,7 @@ local function compileLocal(source) -- for x in ... do if source.parent.type == 'in' then compileForVars(source.parent) - local keyNode = source.parent._iterVars[source] + local keyNode = source.parent._iterVars and source.parent._iterVars[source] if keyNode then vm.setNode(source, keyNode) end -- cgit v1.2.3