Check uniform set validity before freeing

This commit is contained in:
Nick Swoboda 2020-11-18 16:49:56 -08:00
parent a3a3b02bed
commit bce3e2c3f6

View file

@ -1471,7 +1471,9 @@ void RasterizerSceneRD::_setup_giprobes(RID p_render_buffers, const Transform &p
} }
if (giprobes_changed) { if (giprobes_changed) {
if (RD::get_singleton()->uniform_set_is_valid(rb->gi_uniform_set)) {
RD::get_singleton()->free(rb->gi_uniform_set); RD::get_singleton()->free(rb->gi_uniform_set);
}
rb->gi_uniform_set = RID(); rb->gi_uniform_set = RID();
if (rb->volumetric_fog) { if (rb->volumetric_fog) {
if (RD::get_singleton()->uniform_set_is_valid(rb->volumetric_fog->uniform_set)) { if (RD::get_singleton()->uniform_set_is_valid(rb->volumetric_fog->uniform_set)) {