From 4a8276a7734ffb532e24aa77506df756860a78fb Mon Sep 17 00:00:00 2001 From: Yuri Rubinsky Date: Mon, 21 Nov 2022 16:29:21 +0300 Subject: Fix GDScript completion crash --- modules/gdscript/gdscript_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gdscript') diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 48a6e3fb51..7628bffd22 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -2512,7 +2512,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c } static bool _get_subscript_type(GDScriptParser::CompletionContext &p_context, const GDScriptParser::SubscriptNode *p_subscript, GDScriptParser::DataType &r_base_type, Variant *r_base = nullptr) { - if (p_subscript->base->type == GDScriptParser::Node::IDENTIFIER) { + if (p_subscript->base->type == GDScriptParser::Node::IDENTIFIER && p_context.base != nullptr) { const GDScriptParser::GetNodeNode *get_node = nullptr; const GDScriptParser::IdentifierNode *identifier_node = static_cast(p_subscript->base); -- cgit v1.2.3