emu: close audio device if used

This commit is contained in:
Sigrid Solveig Haflínudóttir 2021-10-24 22:14:27 +02:00
parent 2afded6e05
commit a3ee7ab982
No known key found for this signature in database
GPG Key ID: FC8DDA5A6A7456C4
1 changed files with 2 additions and 1 deletions

View File

@ -231,7 +231,8 @@ redraw(Uxn *u)
static void static void
quit(void) quit(void)
{ {
SDL_UnlockAudioDevice(audio_id); if(audio_id)
SDL_CloseAudioDevice(audio_id);
SDL_DestroyTexture(gTexture); SDL_DestroyTexture(gTexture);
gTexture = NULL; gTexture = NULL;
SDL_DestroyRenderer(gRenderer); SDL_DestroyRenderer(gRenderer);