summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2020-07-27 09:50:36 -0300
committerGeorge Marques <george@gmarqu.es>2020-07-27 17:17:39 -0300
commit04f46aea8d73d45673d2b29e98d7c8bf7945bee0 (patch)
treeee97805c6c228b8caa5235216dc9ea4d43eef424
parent0500fa1b730200994d77529c3dc7583912297da3 (diff)
GDScript: Fix crash on 'await' completion
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index 0843a54106..4098425518 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<GDScriptParser::CallNode *>(p_await->to_await), true);
} else {