summaryrefslogtreecommitdiff
path: root/servers/visual/rasterizer_rd
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-14 14:31:54 +0100
committerGitHub <noreply@github.com>2020-02-14 14:31:54 +0100
commit415a901b685997c8949b9705ef5b8fe6eaeda613 (patch)
tree96eeaf1ebffe8237867c175b14173606fa53915b /servers/visual/rasterizer_rd
parent19d6d3d136a6cf20f7e1e8eba473097653f46f9f (diff)
parent17ea60bb926c82ada329b53b293dd05437216efa (diff)
Merge pull request #36194 from dragmz/dragmz/exit_crash_fix
Fix crash when closing project manager
Diffstat (limited to 'servers/visual/rasterizer_rd')
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp2
-rw-r--r--servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
index c0aba2658e..e3c3cdf0bf 100644
--- a/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
@@ -2690,6 +2690,8 @@ RasterizerSceneHighEndRD::RasterizerSceneHighEndRD(RasterizerStorageRD *p_storag
}
RasterizerSceneHighEndRD::~RasterizerSceneHighEndRD() {
+ directional_shadow_atlas_set_size(0);
+
//clear base uniform set if still valid
if (view_dependant_uniform_set.is_valid() && RD::get_singleton()->uniform_set_is_valid(view_dependant_uniform_set)) {
RD::get_singleton()->free(view_dependant_uniform_set);
diff --git a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
index e95b7c0b2a..317ffb994f 100644
--- a/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
+++ b/servers/visual/rasterizer_rd/rasterizer_scene_rd.cpp
@@ -3125,8 +3125,6 @@ RasterizerSceneRD::RasterizerSceneRD(RasterizerStorageRD *p_storage) {
}
RasterizerSceneRD::~RasterizerSceneRD() {
- directional_shadow_atlas_set_size(0);
-
for (Map<Vector2i, ShadowMap>::Element *E = shadow_maps.front(); E; E = E->next()) {
RD::get_singleton()->free(E->get().depth);
}