diff options
author | Samuele Panzeri <samuele.panzeri@gmail.com> | 2023-04-27 18:34:30 +0200 |
---|---|---|
committer | Samuele Panzeri <samuele.panzeri@gmail.com> | 2023-04-27 20:28:22 +0200 |
commit | 4aaa2e6477c2536d55003f58a50b01a74b4af5e5 (patch) | |
tree | 7eba64423370776fa9dab607246b371217ae4f24 /drivers/xaudio2 | |
parent | 240ed28291ae87f06f7bcaa66e3d08530f210bf2 (diff) | |
download | redot-engine-4aaa2e6477c2536d55003f58a50b01a74b4af5e5.tar.gz |
Fix wait for thread not started
Diffstat (limited to 'drivers/xaudio2')
-rw-r--r-- | drivers/xaudio2/audio_driver_xaudio2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp index 2b5f593a07..22063c52d9 100644 --- a/drivers/xaudio2/audio_driver_xaudio2.cpp +++ b/drivers/xaudio2/audio_driver_xaudio2.cpp @@ -151,7 +151,9 @@ void AudioDriverXAudio2::unlock() { void AudioDriverXAudio2::finish() { exit_thread.set(); - thread.wait_to_finish(); + if (thread.is_started()) { + thread.wait_to_finish(); + } if (source_voice) { source_voice->Stop(0); |