Fix race on startup.

This commit is contained in:
Christian Speckner 2024-08-27 22:06:48 +02:00
parent ca77a007dc
commit 74adffdd3a
1 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ void SoundSDL2::callback(void* object, uInt8* stream, int len)
{ {
auto* self = static_cast<SoundSDL2*>(object); auto* self = static_cast<SoundSDL2*>(object);
if(self->myAudioQueue) if(self->myAudioQueue && self->myResampler)
{ {
// The stream is 32-bit float (even though this callback is 8-bits), since // The stream is 32-bit float (even though this callback is 8-bits), since
// the resampler and TIA audio subsystem always generate float samples // the resampler and TIA audio subsystem always generate float samples