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:
parent
197f525783
commit
0ea9cabb50
1 changed files with 3 additions and 1 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue