diff options
author | George Marques <george@gmarqu.es> | 2021-06-08 14:35:09 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2021-08-18 18:58:45 -0300 |
commit | 89695da3376f551379255a0fbb8780e47815927e (patch) | |
tree | 60740a1800da5caa3c2e0664c7ea8a15012b6eaf /modules/gdscript/gdscript_compiler.cpp | |
parent | 1c8b0765023cd0be8abf0e738070842ee5b114fc (diff) |
GDScript: Fix memory leak when using self class as type
Diffstat (limited to 'modules/gdscript/gdscript_compiler.cpp')
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index fe827a5b72..ddf4f281b4 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -126,8 +126,7 @@ GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::D names.pop_back(); } result.kind = GDScriptDataType::GDSCRIPT; - result.script_type_ref = script; - result.script_type = result.script_type_ref.ptr(); + result.script_type = script.ptr(); result.native_type = script->get_instance_base_type(); } else { result.kind = GDScriptDataType::GDSCRIPT; |