summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PostProcessing.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2024-01-27 22:29:45 +0100
committerGitHub <noreply@github.com>2024-01-27 22:29:45 +0100
commit990303a02852cb3d4873089f5fd4230a3ebf5ce2 (patch)
tree6d4d68b0c4c515a5476d6f8e68f814f4ce5b4302 /Source/Core/VideoCommon/PostProcessing.cpp
parente740e32562b842135264f9bcac7906bd43544944 (diff)
parent5aeadb1ef8cd27fc5b5071aac20aa7480c0eb7c0 (diff)
Merge pull request #12519 from lioncash/leak
PostProcessing: Don't potentially leak memory in BlitFromTexture()
Diffstat (limited to 'Source/Core/VideoCommon/PostProcessing.cpp')
-rw-r--r--Source/Core/VideoCommon/PostProcessing.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/PostProcessing.cpp b/Source/Core/VideoCommon/PostProcessing.cpp
index 1458e3c59f..7b66269ec7 100644
--- a/Source/Core/VideoCommon/PostProcessing.cpp
+++ b/Source/Core/VideoCommon/PostProcessing.cpp
@@ -524,9 +524,9 @@ void PostProcessing::BlitFromTexture(const MathUtil::Rectangle<int>& dst,
needs_resampling ? present_rect.GetHeight() : static_cast<u32>(src_rect.GetHeight());
if (!m_intermediary_frame_buffer || !m_intermediary_color_texture ||
- m_intermediary_color_texture.get()->GetWidth() != target_width ||
- m_intermediary_color_texture.get()->GetHeight() != target_height ||
- m_intermediary_color_texture.get()->GetLayers() != target_layers)
+ m_intermediary_color_texture->GetWidth() != target_width ||
+ m_intermediary_color_texture->GetHeight() != target_height ||
+ m_intermediary_color_texture->GetLayers() != target_layers)
{
const TextureConfig intermediary_color_texture_config(
target_width, target_height, 1, target_layers, src_tex->GetSamples(),
@@ -580,8 +580,8 @@ void PostProcessing::BlitFromTexture(const MathUtil::Rectangle<int>& dst,
default_uniform_staging_buffer = false;
}
- m_intermediary_frame_buffer.release();
- m_intermediary_color_texture.release();
+ m_intermediary_frame_buffer.reset();
+ m_intermediary_color_texture.reset();
}
// TODO: ideally we'd do the user selected post process pass in the intermediary buffer in linear