diff --git a/source/lib/res/sound.cpp b/source/lib/res/sound.cpp index 501497562e..e46e15bd8a 100755 --- a/source/lib/res/sound.cpp +++ b/source/lib/res/sound.cpp @@ -56,7 +56,10 @@ static void Sound_dtor(Sound* s) Handle sound_load(const char* filename) { - ONCE(FSOUND_Init(44100, 32, 0)); + ONCE( + FSOUND_Init(44100, 32, 0); + atexit2(FSOUND_Close, 0, CC_STDCALL_0); + ); return h_alloc(H_Sound,filename,0,0); }