From a3ee7ab98278a9e8ae5dfe10bed519a1dfa7a7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigrid=20Solveig=20Hafl=C3=ADnud=C3=B3ttir?= Date: Sun, 24 Oct 2021 22:14:27 +0200 Subject: [PATCH] emu: close audio device if used --- src/uxnemu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uxnemu.c b/src/uxnemu.c index 7be2dc8..6aae2dc 100644 --- a/src/uxnemu.c +++ b/src/uxnemu.c @@ -231,7 +231,8 @@ redraw(Uxn *u) static void quit(void) { - SDL_UnlockAudioDevice(audio_id); + if(audio_id) + SDL_CloseAudioDevice(audio_id); SDL_DestroyTexture(gTexture); gTexture = NULL; SDL_DestroyRenderer(gRenderer);