Merge pull request #90458 from clayjohn/RD-weight-buffer
Clear RIDs of weight buffers when freeing to avoid double free
This commit is contained in:
commit
5c75fa260f
|
@ -130,9 +130,10 @@ void RenderSceneBuffersRD::cleanup() {
|
|||
named_textures.clear();
|
||||
|
||||
// Clear weight_buffer / blur textures.
|
||||
for (const WeightBuffers &weight_buffer : weight_buffers) {
|
||||
for (WeightBuffers &weight_buffer : weight_buffers) {
|
||||
if (weight_buffer.weight.is_valid()) {
|
||||
RD::get_singleton()->free(weight_buffer.weight);
|
||||
weight_buffer.weight = RID();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue