Clear RIDs of weight buffers when freeing to avoid double free
This commit is contained in:
parent
6c57928063
commit
bafbde9f4b
1 changed files with 2 additions and 1 deletions
|
@ -130,9 +130,10 @@ void RenderSceneBuffersRD::cleanup() {
|
||||||
named_textures.clear();
|
named_textures.clear();
|
||||||
|
|
||||||
// Clear weight_buffer / blur textures.
|
// Clear weight_buffer / blur textures.
|
||||||
for (const WeightBuffers &weight_buffer : weight_buffers) {
|
for (WeightBuffers &weight_buffer : weight_buffers) {
|
||||||
if (weight_buffer.weight.is_valid()) {
|
if (weight_buffer.weight.is_valid()) {
|
||||||
RD::get_singleton()->free(weight_buffer.weight);
|
RD::get_singleton()->free(weight_buffer.weight);
|
||||||
|
weight_buffer.weight = RID();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue