mirror of
https://github.com/godotengine/godot.git
synced 2026-02-08 03:38:29 +00:00
Merge pull request #115278 from MattiaZir/fix-while-null-node-condition
Parser: Fix "trying to resolve type of null node" when missing condition.
This commit is contained in:
@@ -2258,7 +2258,7 @@ void GDScriptAnalyzer::resolve_for(GDScriptParser::ForNode *p_for) {
|
||||
GDScriptParser::DataType list_type;
|
||||
|
||||
if (p_for->list) {
|
||||
resolve_node(p_for->list, false);
|
||||
reduce_expression(p_for->list);
|
||||
|
||||
bool is_range = false;
|
||||
if (p_for->list->type == GDScriptParser::Node::CALL) {
|
||||
@@ -2375,8 +2375,7 @@ void GDScriptAnalyzer::resolve_for(GDScriptParser::ForNode *p_for) {
|
||||
}
|
||||
|
||||
void GDScriptAnalyzer::resolve_while(GDScriptParser::WhileNode *p_while) {
|
||||
resolve_node(p_while->condition, false);
|
||||
|
||||
reduce_expression(p_while->condition);
|
||||
resolve_suite(p_while->loop);
|
||||
p_while->set_datatype(p_while->loop->get_datatype());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user