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

Otherwise, we spam a bunch of unnecessary SDL_SetError() calls.

Fixes Bugzilla #1791.
This commit is contained in:
Ryan C. Gordon 2013-07-05 00:30:23 -04:00
parent 197f525783
commit 0ea9cabb50

View file

@ -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 */