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 25283c7e99
commit 6ca14bb9d2

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