diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2019-07-02 17:23:54 +0300 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2019-07-02 17:23:54 +0300 |
commit | f7dad789e958fed81bb167b14c5add45ef723cf9 (patch) | |
tree | d881920fc476fd538e80af17610efb1d6d3a1732 /drivers | |
parent | 4cb0887660861402fe6857662e622488adb86514 (diff) |
Fix various memory leaks and errors
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 14 |
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; } |