aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Gregan <[email protected]>2022-12-20 14:30:53 +1300
committerPaul Adenot <[email protected]>2023-01-05 14:21:58 +0100
commit1736e4aed380a26373c93f6a0e9d8473d4a2f925 (patch)
tree09ac3184a03dd0651861fe5d55697cdb34f5e2f1
parentdbc60333f54246cf75253c65989e08d0b8c60e7b (diff)
downloadcubeb-1736e4aed380a26373c93f6a0e9d8473d4a2f925.tar.gz
cubeb-1736e4aed380a26373c93f6a0e9d8473d4a2f925.zip
wasapi: Drop context lock before deleting context.
-rw-r--r--src/cubeb_wasapi.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/cubeb_wasapi.cpp b/src/cubeb_wasapi.cpp
index a5f4759..897c3f3 100644
--- a/src/cubeb_wasapi.cpp
+++ b/src/cubeb_wasapi.cpp
@@ -1826,12 +1826,14 @@ stop_and_join_render_thread(cubeb_stream * stm, ShutdownPhase phase)
void
wasapi_destroy(cubeb * context)
{
- auto_lock lock(context->lock);
- XASSERT(!context->device_collection_enumerator &&
- !context->collection_notification_client);
+ {
+ auto_lock lock(context->lock);
+ XASSERT(!context->device_collection_enumerator &&
+ !context->collection_notification_client);
- if (context->device_ids) {
- cubeb_strings_destroy(context->device_ids);
+ if (context->device_ids) {
+ cubeb_strings_destroy(context->device_ids);
+ }
}
delete context;