Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Don't close already-closed audio devices during SDL_Quit().

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 38864a6d6bf2dea8110e92dd05ea9e36faddfba5
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/audio/SDL_audio.c
@@ -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 */

0 comments on commit 38864a6

Please sign in to comment.