aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/event.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-03-03 13:53:41 -0800
committerChris Robinson <[email protected]>2018-03-03 13:54:21 -0800
commitb8636a3dbff0a9003aa00d871fa20302cb82e36d (patch)
tree408f5c0fa23ca6c58a545722f51b80bb95b7d6b6 /OpenAL32/event.c
parent4e6c758daf1849741712eaf451f392264fd49244 (diff)
Add some missing locks to protect reading state
Diffstat (limited to 'OpenAL32/event.c')
-rw-r--r--OpenAL32/event.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/OpenAL32/event.c b/OpenAL32/event.c
index 333b7613..6fd2e96f 100644
--- a/OpenAL32/event.c
+++ b/OpenAL32/event.c
@@ -134,10 +134,12 @@ AL_API void AL_APIENTRY alEventCallbackSOFT(ALEVENTPROCSOFT callback, void *user
context = GetContextRef();
if(!context) return;
+ almtx_lock(&context->PropLock);
almtx_lock(&context->EventCbLock);
context->EventCb = callback;
context->EventParam = userParam;
almtx_unlock(&context->EventCbLock);
+ almtx_unlock(&context->PropLock);
ALCcontext_DecRef(context);
}