Browse Source

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

Fix crash when writing $. in the editor
George Marques 3 years ago
parent
commit
6da061faf5
1 changed files with 3 additions and 0 deletions
  1. 3 0
      modules/gdscript/gdscript_analyzer.cpp

+ 3 - 0
modules/gdscript/gdscript_analyzer.cpp

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