GDScript Check for null list in for loop

This commit is contained in:
Brian Semrau committed 2021-10-02 13:53:56 -04:00
1 parent 90f8eb7aa0
commit dc046e5cbe
2 files changed
+8 -2

No files matched your search

+4
View File
@@ -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.