mirror of
https://github.com/godotengine/godot.git
synced 2025-10-30 13:11:13 +00:00
GDScript Check for null list in for loop
This commit is contained in:
parent
90f8eb7aa0
commit
dc046e5cbe
2 changed files with 8 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue