Skip to content

Commit

Permalink
GDScript: Fix memory leak when using self class as type
Browse files Browse the repository at this point in the history
  • Loading branch information
vnen committed Aug 18, 2021
1 parent 1c8b076 commit 89695da
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/gdscript/gdscript_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 89695da

Please sign in to comment.