Merge pull request #55701 from lawnjelly/fix_gles2_env_leak
This commit is contained in:
commit
7ac92d2bc8
1 changed files with 7 additions and 0 deletions
|
@ -3875,6 +3875,7 @@ bool RasterizerSceneGLES2::free(RID p_rid) {
|
|||
shadow_atlas_set_size(p_rid, 0);
|
||||
shadow_atlas_owner.free(p_rid);
|
||||
memdelete(shadow_atlas);
|
||||
|
||||
} else if (reflection_probe_instance_owner.owns(p_rid)) {
|
||||
ReflectionProbeInstance *reflection_instance = reflection_probe_instance_owner.get(p_rid);
|
||||
|
||||
|
@ -3892,6 +3893,12 @@ bool RasterizerSceneGLES2::free(RID p_rid) {
|
|||
reflection_probe_instance_owner.free(p_rid);
|
||||
memdelete(reflection_instance);
|
||||
|
||||
} else if (environment_owner.owns(p_rid)) {
|
||||
Environment *environment = environment_owner.get(p_rid);
|
||||
|
||||
environment_owner.free(p_rid);
|
||||
memdelete(environment);
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue