Merge pull request #36194 from dragmz/dragmz/exit_crash_fix

Fix crash when closing project manager
This commit is contained in:
Rémi Verschelde 2020-02-14 14:31:54 +01:00 committed by GitHub
commit 415a901b68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);
}