Index: trunk/src/sdl/sdl_audio.cc
===================================================================
--- trunk/src/sdl/sdl_audio.cc	(revision 529)
+++ trunk/src/sdl/sdl_audio.cc	(revision 543)
@@ -111,6 +111,6 @@
 nv::sdl::audio::~audio()
 {
-	while ( m_sounds.size() > 0 )
-		release( m_sounds.get_handle(0) );
+	for ( auto& s : m_sounds )
+		release( &s );
 	Mix_CloseAudio();
 	// TODO: should we do it here?
@@ -121,9 +121,12 @@
 {
 	sound_info* info = m_sounds.get( a_sound );
+	release( info );
+	m_sounds.destroy( a_sound );
+}
+
+void nv::sdl::audio::release( sound_info* info )
+{
 	if ( info )
-	{
 		Mix_FreeChunk( static_cast<Mix_Chunk*>( info->sdl_sound ) );
-		m_sounds.destroy( a_sound );
-	}
 }
 
