summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_scene_gles3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/rasterizer_scene_gles3.cpp')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 91c0693538..c2fde148e2 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -4990,6 +4990,20 @@ bool RasterizerSceneGLES3::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 if (gi_probe_instance_owner.owns(p_rid)) {
+
+ GIProbeInstance *gi_probe_instance = gi_probe_instance_owner.get(p_rid);
+
+ gi_probe_instance_owner.free(p_rid);
+ memdelete(gi_probe_instance);
+
} else {
return false;
}