summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Scott <ascott.ca@gmail.com>2022-12-08 23:40:17 -0500
committerAdam Scott <ascott.ca@gmail.com>2022-12-08 23:40:17 -0500
commitda65b61edb1c5df8da5aac534af96efd4dcda425 (patch)
tree26e56cf7f913d19abc02066dd9e1091d216c8567
parentf692b476869c14023b342c12efc21cb5cd6002b7 (diff)
Fix autocomplete crash as it would infinite loop
-rw-r--r--modules/gdscript/gdscript_editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index 1456612915..693863ab38 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -1612,7 +1612,7 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
}
}
- if (!found) {
+ if (!found && base.value.get_type() != Variant::NIL) {
found = _guess_method_return_type_from_base(c, base, call->function_name, r_type);
}
}