play_sound now handles empty list of sounds, this fixes the empty chunk error

This commit is contained in:
Jérémy Rosen 2006-07-24 19:32:24 +00:00
parent 1fb8195de9
commit f457e45842

View file

@ -426,6 +426,7 @@ void write_music_play_list(config& snapshot)
void play_sound(const std::string& files)
{
if(files.empty()) return;
if(preferences::sound_on() && mix_ok) {
std::string file = pick_one(files);
// the insertion will fail if there is already an element in the cache