From 04f46aea8d73d45673d2b29e98d7c8bf7945bee0 Mon Sep 17 00:00:00 2001 From: George Marques Date: Mon, 27 Jul 2020 09:50:36 -0300 Subject: [PATCH] GDScript: Fix crash on 'await' completion --- modules/gdscript/gdscript_analyzer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 0843a54106c..4098425518f 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -1430,6 +1430,12 @@ void GDScriptAnalyzer::reduce_assignment(GDScriptParser::AssignmentNode *p_assig } void GDScriptAnalyzer::reduce_await(GDScriptParser::AwaitNode *p_await) { + if (p_await->to_await == nullptr) { + GDScriptParser::DataType await_type; + await_type.kind = GDScriptParser::DataType::VARIANT; + p_await->set_datatype(await_type); + return; + } if (p_await->to_await->type == GDScriptParser::Node::CALL) { reduce_call(static_cast(p_await->to_await), true); } else {