Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Don't close already-closed audio devices during SDL_Quit().
Browse files Browse the repository at this point in the history
Otherwise, we spam a bunch of unnecessary SDL_SetError() calls.

Fixes Bugzilla #1791.
  • Loading branch information
icculus committed Jul 5, 2013
1 parent c30be4d commit 38864a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/audio/SDL_audio.c
Expand Up @@ -1174,7 +1174,9 @@ SDL_AudioQuit(void)
{
SDL_AudioDeviceID i;
for (i = 0; i < SDL_arraysize(open_devices); i++) {
SDL_CloseAudioDevice(i);
if (open_devices[i] != NULL) {
SDL_CloseAudioDevice(i);
}
}

/* Free the driver data */
Expand Down

0 comments on commit 38864a6

Please sign in to comment.