Fix errors on quitting from an empty project
This commit is contained in:
parent
523e0d80a8
commit
26a26d6657
3 changed files with 6 additions and 2 deletions
|
@ -292,7 +292,6 @@ ProceduralSkyMaterial::ProceduralSkyMaterial() {
|
|||
}
|
||||
|
||||
ProceduralSkyMaterial::~ProceduralSkyMaterial() {
|
||||
RS::get_singleton()->material_set_shader(_get_material(), RID());
|
||||
}
|
||||
|
||||
/////////////////////////////////////////
|
||||
|
@ -368,7 +367,6 @@ PanoramaSkyMaterial::PanoramaSkyMaterial() {
|
|||
}
|
||||
|
||||
PanoramaSkyMaterial::~PanoramaSkyMaterial() {
|
||||
RS::get_singleton()->material_set_shader(_get_material(), RID());
|
||||
}
|
||||
|
||||
//////////////////////////////////
|
||||
|
|
|
@ -1781,6 +1781,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) {
|
||||
|
|
|
@ -576,6 +576,7 @@ void RendererSceneSkyRD::Sky::free(RendererStorageRD *p_storage) {
|
|||
|
||||
if (material.is_valid()) {
|
||||
p_storage->free(material);
|
||||
material = RID();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue