summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2021-09-10 10:55:11 -0300
committerGitHub <noreply@github.com>2021-09-10 10:55:11 -0300
commit6da061faf5dc20a9d0757983e6af1576ee1fc4df (patch)
tree23352276dda7f3025cf958030de22ac0a84f014b /modules/gdscript/gdscript_analyzer.cpp
parent0b484c5f5fc89e35bece5cb9df3380bec6540b7e (diff)
parentbf8795c7af3fa4d12f77e983fbb142d6e7904c33 (diff)
Merge pull request #49897 from Blackiris/fix-dollar-point-crash-on-editor
Fix crash when writing $. in the editor
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index f2b601dc2c..fc0bef3ba2 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/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 {