diff options
author | Julien Nguyen <julien.nguyen3@gmail.com> | 2021-06-24 22:03:40 +0200 |
---|---|---|
committer | Julien Nguyen <julien.nguyen3@gmail.com> | 2021-07-08 20:49:57 +0200 |
commit | bf8795c7af3fa4d12f77e983fbb142d6e7904c33 (patch) | |
tree | d5640a50b6ed0bc23be7847da3582f023b06fc4c | |
parent | 14cc1df1d8921600758bb40d27dde1200f109414 (diff) |
Fix crash when writing $. in the editor
-rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index e7fb33a6a7..d71c4fc8c0 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -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 { |