summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2019-07-02 17:23:54 +0300
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2019-07-02 17:23:54 +0300
commitf7dad789e958fed81bb167b14c5add45ef723cf9 (patch)
treed881920fc476fd538e80af17610efb1d6d3a1732 /drivers
parent4cb0887660861402fe6857662e622488adb86514 (diff)
Fix various memory leaks and errors
Diffstat (limited to 'drivers')
-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;
}