GDScript Check for null list in for loop
This commit is contained in:
1 parent
90f8eb7aa0
commit
dc046e5cbe
2 files changed
+8
-2
No files matched your search
@@ -1620,6 +1620,10 @@ GDScriptParser::ForNode *GDScriptParser::parse_for() {
|
||||
|
||||
n_for->list = parse_expression(false);
|
||||
|
||||
if (!n_for->list) {
|
||||
push_error(R"(Expected a list or range after "in".)");
|
||||
}
|
||||
|
||||
consume(GDScriptTokenizer::Token::COLON, R"(Expected ":" after "for" condition.)");
|
||||
|
||||
// Save break/continue state.
|
||||
|
||||
Reference in new issue
Block a user