Merge pull request #53954 from Chaosus/fix_quit_errors

This commit is contained in:
Rémi Verschelde 2022-01-25 20:09:52 +01:00 committed by GitHub
commit d9fd16c8e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -292,7 +292,6 @@ ProceduralSkyMaterial::ProceduralSkyMaterial() {
}
ProceduralSkyMaterial::~ProceduralSkyMaterial() {
RS::get_singleton()->material_set_shader(_get_material(), RID());
}
/////////////////////////////////////////
@ -389,7 +388,6 @@ PanoramaSkyMaterial::PanoramaSkyMaterial() {
}
PanoramaSkyMaterial::~PanoramaSkyMaterial() {
RS::get_singleton()->material_set_shader(_get_material(), RID());
}
//////////////////////////////////

View File

@ -1920,6 +1920,11 @@ void RendererSceneRenderRD::_free_render_buffer_data(RenderBuffers *rb) {
rb->ambient_buffer = RID();
rb->reflection_buffer = RID();
}
if (rb->gi.voxel_gi_buffer.is_valid()) {
RD::get_singleton()->free(rb->gi.voxel_gi_buffer);
rb->gi.voxel_gi_buffer = RID();
}
}
void RendererSceneRenderRD::_process_sss(RID p_render_buffers, const CameraMatrix &p_camera) {

View File

@ -590,6 +590,7 @@ void RendererSceneSkyRD::Sky::free(RendererStorageRD *p_storage) {
if (material.is_valid()) {
p_storage->free(material);
material = RID();
}
}