Don't close already-closed audio devices during SDL_Quit().
Otherwise, we spam a bunch of unnecessary SDL_SetError() calls.
Fixes Bugzilla #1791.
1.1 --- a/src/audio/SDL_audio.c Wed Jul 03 12:31:40 2013 -0700
1.2 +++ b/src/audio/SDL_audio.c Fri Jul 05 00:30:23 2013 -0400
1.3 @@ -1174,7 +1174,9 @@
1.4 {
1.5 SDL_AudioDeviceID i;
1.6 for (i = 0; i < SDL_arraysize(open_devices); i++) {
1.7 - SDL_CloseAudioDevice(i);
1.8 + if (open_devices[i] != NULL) {
1.9 + SDL_CloseAudioDevice(i);
1.10 + }
1.11 }
1.12
1.13 /* Free the driver data */