diff options
Diffstat (limited to 'src/cubeb_wasapi.cpp')
-rw-r--r-- | src/cubeb_wasapi.cpp | 12 |
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; |