play_sound now handles empty list of sounds, this fixes the empty chunk error
This commit is contained in:
parent
1fb8195de9
commit
f457e45842
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue