Skip to content

Commit

Permalink
Clear RIDs of weight buffers when freeing to avoid double free
Browse files Browse the repository at this point in the history
(cherry picked from commit bafbde9)
  • Loading branch information
clayjohn authored and akien-mga committed Apr 14, 2024
1 parent 16a8334 commit 4cffca7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,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();
}
}
}
Expand Down

0 comments on commit 4cffca7

Please sign in to comment.