Skip to content

Commit

Permalink
Avoid trying to free null RIDs in FSR2 teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomShaper committed Sep 27, 2023
1 parent ec62b8a commit f84c3d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion servers/rendering/renderer_rd/effects/fsr2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,9 @@ FSR2Effect::~FSR2Effect() {
RD::get_singleton()->free(device.linear_clamp_sampler);

for (uint32_t i = 0; i < FFX_FSR2_PASS_COUNT; i++) {
RD::get_singleton()->free(device.passes[i].pipeline.pipeline_rid);
if (device.passes[i].pipeline.pipeline_rid.is_valid()) {
RD::get_singleton()->free(device.passes[i].pipeline.pipeline_rid);
}
device.passes[i].shader->version_free(device.passes[i].shader_version);
}
}
Expand Down

0 comments on commit f84c3d4

Please sign in to comment.