Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Don't crash if SDL_AudioQuit() is called twice in a row.
Browse files Browse the repository at this point in the history
Fixes Bugzilla #1396.
  • Loading branch information
icculus committed Jul 5, 2013
1 parent d8b384d commit 26302f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/audio/SDL_audio.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 26302f4

Please sign in to comment.