all repos — mgba @ 35b5101f3cf2d32cad792716234d0ae7e00f690a

mGBA Game Boy Advance Emulator

SDL: Fix another audio crash
Jeffrey Pfau jeffrey@endrift.com
Tue, 20 Oct 2015 19:40:14 -0700
commit

35b5101f3cf2d32cad792716234d0ae7e00f690a

parent

98016c55a387ee3676de198af9b534e53e25625d

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/platform/sdl/sdl-audio.csrc/platform/sdl/sdl-audio.c

@@ -97,7 +97,7 @@ }

static void _GBASDLAudioCallback(void* context, Uint8* data, int len) { struct GBASDLAudio* audioContext = context; - if (!context || (!audioContext->thread && !audioContext->gba)) { + if (!context || ((!audioContext->thread || !audioContext->thread->gba) && !audioContext->gba)) { memset(data, 0, len); return; }