summaryrefslogtreecommitdiffstats
path: root/servers/audio/audio_driver_dummy.cpp
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 /servers/audio/audio_driver_dummy.cpp
parent240ed28291ae87f06f7bcaa66e3d08530f210bf2 (diff)
downloadredot-engine-4aaa2e6477c2536d55003f58a50b01a74b4af5e5.tar.gz
Fix wait for thread not started
Diffstat (limited to 'servers/audio/audio_driver_dummy.cpp')
-rw-r--r--servers/audio/audio_driver_dummy.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/servers/audio/audio_driver_dummy.cpp b/servers/audio/audio_driver_dummy.cpp
index 1d11c01b9a..e1bfcbaca1 100644
--- a/servers/audio/audio_driver_dummy.cpp
+++ b/servers/audio/audio_driver_dummy.cpp
@@ -136,7 +136,9 @@ void AudioDriverDummy::mix_audio(int p_frames, int32_t *p_buffer) {
void AudioDriverDummy::finish() {
if (use_threads) {
exit_thread.set();
- thread.wait_to_finish();
+ if (thread.is_started()) {
+ thread.wait_to_finish();
+ }
}
if (samples_in) {