mirror of
https://github.com/yawut/SDL.git
synced 2026-09-30 12:16:43 -05:00
Don't crash if SDL_AudioQuit() is called twice in a row.
Fixes Bugzilla #1396.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user