diff options
author | Chris Robinson <[email protected]> | 2020-03-29 03:44:34 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-03-29 03:44:34 -0700 |
commit | fb433cd9181e6dfd1ccd79b8f0b80368bf85d8d2 (patch) | |
tree | 9b9ddfb478da37fd25374ec4014036960d6a0cf7 /alc/backends | |
parent | 5dfa24d5e271860cd58788790f9aefd742ab26b7 (diff) |
Protect the call to pa_mainloop_quit with the mutex
Diffstat (limited to 'alc/backends')
-rw-r--r-- | alc/backends/pulseaudio.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp index 5902750b..e40204f5 100644 --- a/alc/backends/pulseaudio.cpp +++ b/alc/backends/pulseaudio.cpp @@ -365,7 +365,10 @@ public: { if(mThread.joinable()) { - pa_mainloop_quit(mMainloop, 0); + { + std::lock_guard<std::mutex> _{mMutex}; + pa_mainloop_quit(mMainloop, 0); + } mThread.join(); } } |