mirror of
https://github.com/yawut/SDL.git
synced 2026-09-07 08:36:19 -05:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user