1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

GDScript: Fix crash on 'await' completion

This commit is contained in:
George Marques
2020-07-27 09:50:36 -03:00
parent 0500fa1b73
commit 04f46aea8d

View File

@@ -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 {