diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-10 16:59:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-10 16:59:36 +0100 |
commit | eea510fc3518da2778035a840349094f31b8c662 (patch) | |
tree | 31da4ad8188adffeaf0caf520bff4c33223b9830 | |
parent | e6cc0ff1a58bc8b8400b44149155ca19e1353866 (diff) | |
parent | 609964848dea60303c999f08dbc14aca79d14aca (diff) |
Merge pull request #56651 from gerhean/Fix-leak-when-function-returning-parent-class-type
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index af5ada513c..ea0ad5f7a1 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -2069,7 +2069,7 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_ if (p_func) { // if no return statement -> return type is void not unresolved Variant if (p_func->body->has_return) { - gd_function->return_type = _gdtype_from_datatype(p_func->get_datatype()); + gd_function->return_type = _gdtype_from_datatype(p_func->get_datatype(), p_script); } else { gd_function->return_type = GDScriptDataType(); gd_function->return_type.has_type = true; |