Skip to content

Commit

Permalink
Merge pull request #55701 from lawnjelly/fix_gles2_env_leak
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Dec 7, 2021
2 parents 05f8986 + 7134ef9 commit 7ac92d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/gles2/rasterizer_scene_gles2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
}
Expand Down

0 comments on commit 7ac92d2

Please sign in to comment.