Don't crash if SDL_AudioQuit() is called twice in a row.
Fixes Bugzilla #1396.
This commit is contained in:
parent
292c6c09ee
commit
522eeaf814
1 changed files with 4 additions and 0 deletions
|
@ -1172,6 +1172,10 @@ SDL_CloseAudio(void)
|
|||
void
|
||||
SDL_AudioQuit(void)
|
||||
{
|
||||
if (!current_audio.name) { /* not initialized?! */
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_AudioDeviceID i;
|
||||
for (i = 0; i < SDL_arraysize(open_devices); i++) {
|
||||
if (open_devices[i] != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue