Fix crash when writing $. in the editor

This commit is contained in:
Julien Nguyen 2021-06-24 22:03:40 +02:00
parent 14cc1df1d8
commit bf8795c7af

View File

@ -2728,6 +2728,9 @@ void GDScriptAnalyzer::reduce_self(GDScriptParser::SelfNode *p_self) {
}
void GDScriptAnalyzer::reduce_subscript(GDScriptParser::SubscriptNode *p_subscript) {
if (p_subscript->base == nullptr) {
return;
}
if (p_subscript->base->type == GDScriptParser::Node::IDENTIFIER) {
reduce_identifier(static_cast<GDScriptParser::IdentifierNode *>(p_subscript->base), true);
} else {