summaryrefslogtreecommitdiffstats
path: root/drivers/wasapi
diff options
context:
space:
mode:
authorSamuele Panzeri <samuele.panzeri@gmail.com>2023-04-27 18:34:30 +0200
committerSamuele Panzeri <samuele.panzeri@gmail.com>2023-04-27 20:28:22 +0200
commit4aaa2e6477c2536d55003f58a50b01a74b4af5e5 (patch)
tree7eba64423370776fa9dab607246b371217ae4f24 /drivers/wasapi
parent240ed28291ae87f06f7bcaa66e3d08530f210bf2 (diff)
downloadredot-engine-4aaa2e6477c2536d55003f58a50b01a74b4af5e5.tar.gz
Fix wait for thread not started
Diffstat (limited to 'drivers/wasapi')
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
index 7d11293f9b..f877f78665 100644
--- a/drivers/wasapi/audio_driver_wasapi.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -930,7 +930,9 @@ void AudioDriverWASAPI::unlock() {
void AudioDriverWASAPI::finish() {
exit_thread.set();
- thread.wait_to_finish();
+ if (thread.is_started()) {
+ thread.wait_to_finish();
+ }
finish_input_device();
finish_output_device();