summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorShootfast <markboo99@gmail.com>2021-03-02 16:42:25 +0000
committerGitHub <noreply@github.com>2021-03-02 16:42:25 +0000
commit4e2d8d0b8408e6054cbf7dbda15c742d8698efd7 (patch)
tree6bb7c76dfd6e955ef8c73f3dff3326e43780dbbe /Graphics/GraphicsEngine
parentUpdate error message for mismatched clang-format (#192) (diff)
downloadDiligentCore-4e2d8d0b8408e6054cbf7dbda15c742d8698efd7.tar.gz
DiligentCore-4e2d8d0b8408e6054cbf7dbda15c742d8698efd7.zip
Fixed uninitialized atomic in StateObjectsRegistry (#193)
Add() method was attempting to read m_NumDeletedObjects before it was initialized.
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/StateObjectsRegistry.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngine/include/StateObjectsRegistry.hpp b/Graphics/GraphicsEngine/include/StateObjectsRegistry.hpp
index a2a7cad1..937e6908 100644
--- a/Graphics/GraphicsEngine/include/StateObjectsRegistry.hpp
+++ b/Graphics/GraphicsEngine/include/StateObjectsRegistry.hpp
@@ -66,6 +66,7 @@ public:
static constexpr int DeletedObjectsToPurge = 32;
StateObjectsRegistry(IMemoryAllocator& RawAllocator, const Char* RegistryName) :
+ m_NumDeletedObjects{0},
m_DescToObjHashMap(STD_ALLOCATOR_RAW_MEM(HashMapElem, RawAllocator, "Allocator for unordered_map<ResourceDescType, RefCntWeakPtr<IDeviceObject> >")),
m_RegistryName{RegistryName}
{}