From 8398f4ef74fc26481f80821dcddaf3df26029f90 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Thu, 3 Apr 2025 00:30:06 +0200 Subject: [PATCH] Added a couple of missing lock guards --- src/UpscalerGraphicsDevice.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/UpscalerGraphicsDevice.h b/src/UpscalerGraphicsDevice.h index d36f612..a32ea99 100644 --- a/src/UpscalerGraphicsDevice.h +++ b/src/UpscalerGraphicsDevice.h @@ -72,6 +72,8 @@ public: void ClearTextureTable(uint32_t featureSlot) override { + std::lock_guard lock(m_Mutex); + if (featureSlot < 0 || featureSlot >= m_Features.size()) return; @@ -80,6 +82,8 @@ public: void SetTextureSlot(uint32_t featureSlot, uint32_t textureSlot, UnityTextureID textureID, uint32_t width, uint32_t height) override { + std::lock_guard lock(m_Mutex); + if (featureSlot < 0 || featureSlot >= m_Features.size()) return;