Don't show music tracks which can't be found and spit out a warning.
This commit is contained in:
parent
14da08a391
commit
1871e9fca4
1 changed files with 5 additions and 1 deletions
|
@ -148,7 +148,11 @@ void editor_controller::init_music(const config& game_config)
|
|||
else {
|
||||
BOOST_FOREACH(const config& editor_music, game_config.child_range(tag_name)) {
|
||||
BOOST_FOREACH(const config& music, editor_music.child_range("music")) {
|
||||
music_tracks_.push_back(sound::music_track(music));
|
||||
sound::music_track track(music);
|
||||
if (track.file_path().empty())
|
||||
WRN_ED << "Music track " << track.id() << " not found.\n";
|
||||
else
|
||||
music_tracks_.push_back(sound::music_track(music));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue