GDScript: Fix memory leak when using self class as type

This commit is contained in:
George Marques 2021-06-08 14:35:09 -03:00
parent 1c8b076502
commit 89695da337
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D

View file

@ -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;