summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_analyzer.cpp
diff options
context:
space:
mode:
authorLyuma <xn.lyuma@gmail.com>2020-07-29 02:54:15 -0700
committerLyuma <xn.lyuma@gmail.com>2020-07-29 02:56:03 -0700
commit68566b7bec5a23b43809666940531a58b0a5b6b6 (patch)
tree893e9e266a333c05add1c92bc7f4f1a1fa0e5a30 /modules/gdscript/gdscript_analyzer.cpp
parent3890638d84e39a7d5b3f4696f1ca069d34e33964 (diff)
downloadredot-engine-68566b7bec5a23b43809666940531a58b0a5b6b6.tar.gz
GDScript: Fix crash caused by inconsistent get_member
Diffstat (limited to 'modules/gdscript/gdscript_analyzer.cpp')
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index 4098425518..597a79a40c 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -2019,7 +2019,7 @@ void GDScriptAnalyzer::reduce_identifier_from_base(GDScriptParser::IdentifierNod
GDScriptParser::ClassNode *outer = base_class->outer;
while (outer != nullptr) {
if (outer->has_member(name)) {
- const GDScriptParser::ClassNode::Member &member = base_class->get_member(name);
+ const GDScriptParser::ClassNode::Member &member = outer->get_member(name);
if (member.type == GDScriptParser::ClassNode::Member::CONSTANT) {
// TODO: Make sure loops won't cause problem. And make special error message for those.
// For out-of-order resolution: