Don't crash if SDL_AudioQuit() is called twice in a row.

Fixes Bugzilla #1396.
This commit is contained in:
Ryan C. Gordon 2013-07-05 00:54:00 -04:00
parent 292c6c09ee
commit 522eeaf814

View file

@ -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) {