From aee10ef60623e012e5edc6fcf31b2d71b2086bc9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 1 Sep 2019 00:24:49 -0700 Subject: Hold the source lock in UpdateAllSourceProps --- al/source.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'al/source.cpp') diff --git a/al/source.cpp b/al/source.cpp index d9a7cb87..08e4bff6 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -3318,6 +3318,7 @@ ALsource::~ALsource() void UpdateAllSourceProps(ALCcontext *context) { + std::lock_guard _{context->mSourceLock}; auto voices_end = context->mVoices->begin() + context->mVoiceCount.load(std::memory_order_relaxed); std::for_each(context->mVoices->begin(), voices_end, -- cgit v1.2.3