Merge pull request #49897 from Blackiris/fix-dollar-point-crash-on-editor

Fix crash when writing $. in the editor
This commit is contained in:
George Marques 2021-09-10 10:55:11 -03:00 committed by GitHub
commit 6da061faf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2837,6 +2837,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 {