From 74adffdd3a993a640445e49dc8a7ae74e5da71c2 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Tue, 27 Aug 2024 22:06:48 +0200 Subject: [PATCH] Fix race on startup. --- src/common/SoundSDL2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/SoundSDL2.cxx b/src/common/SoundSDL2.cxx index debe6143e..7f8edeb02 100644 --- a/src/common/SoundSDL2.cxx +++ b/src/common/SoundSDL2.cxx @@ -369,7 +369,7 @@ void SoundSDL2::callback(void* object, uInt8* stream, int len) { auto* self = static_cast(object); - if(self->myAudioQueue) + if(self->myAudioQueue && self->myResampler) { // The stream is 32-bit float (even though this callback is 8-bits), since // the resampler and TIA audio subsystem always generate float samples