diff --git a/src/sound.c b/src/sound.c
index ab925241120c2e8c22b05234ae1d90ede8edff79..de334340c50f820be2065c5339790bd586cae71e 100644 (file)
--- a/src/sound.c
+++ b/src/sound.c
*/
#include "glob.h"
-#include "files.h"
#include "sound.h"
+#include "error.h"
#include <SDL.h>
#include <SDL_mixer.h>
void S_done(void)
{
free_chunks();
- Mix_CloseAudio();
- SDL_QuitSubSystem(SDL_INIT_AUDIO);
+ if (SDL_WasInit(SDL_INIT_AUDIO)) {
+ Mix_CloseAudio();
+ SDL_QuitSubSystem(SDL_INIT_AUDIO);
+ }
}
Mix_Chunk * get_chunk(snd_t *s, int r, int v)