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:
Rémi Verschelde 2024-04-10 14:22:37 +02:00
commit 5c75fa260f
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 1 deletions

View File

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