From 372c522ce1b4ce857384d8f41e10038ac0ce6e5a Mon Sep 17 00:00:00 2001 From: Mattia Zirpoli Date: Thu, 22 Jan 2026 16:01:29 +0100 Subject: [PATCH] Parser: Fix "trying to resolve type of null node" when missing condition. --- modules/gdscript/gdscript_analyzer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 28d4dd5d11..aacae6482b 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -2256,7 +2256,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) { @@ -2373,8 +2373,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()); }