aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-21 05:35:47 -0800
committerChris Robinson <[email protected]>2018-11-21 05:35:47 -0800
commit75213ee6f951355906bd1744a2936bb764f23e40 (patch)
treead33740d5373728f995213e60af6d06d19782ccb /Alc/alc.cpp
parent757c42c74bb1f88dfc6f24200382a0ea741fccac (diff)
Always use RAII with EffectSlotLock
Diffstat (limited to 'Alc/alc.cpp')
-rw-r--r--Alc/alc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/alc.cpp b/Alc/alc.cpp
index fa7b9f44..28c9bc6f 100644
--- a/Alc/alc.cpp
+++ b/Alc/alc.cpp
@@ -2263,7 +2263,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
}
almtx_lock(&context->PropLock);
- almtx_lock(&context->EffectSlotLock);
+ std::unique_lock<almtx_t> slotlock{context->EffectSlotLock};
for(auto &slot : context->EffectSlotList)
{
EffectState *state = slot->Effect.State;
@@ -2275,7 +2275,7 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
else
UpdateEffectSlotProps(slot.get(), context);
}
- almtx_unlock(&context->EffectSlotLock);
+ slotlock.unlock();
almtx_lock(&context->SourceLock);
for(auto &sublist : context->SourceList)