No more crashing if an invalid Jukebox path is entered - default to MIDI

This commit is contained in:
kreatordxx 2010-02-27 13:05:34 +00:00
parent 303c3d91b1
commit 1dbd60254c
2 changed files with 3 additions and 0 deletions

View file

@ -3,6 +3,7 @@ D1X-Rebirth Changelog
20100227
--------
main/menu.c: Actually change to MIDI if Jukebox was selected
arch/sdl/jukebox.c: No more crashing if an invalid Jukebox path is entered - default to MIDI
20100226
--------

View file

@ -96,6 +96,8 @@ int jukebox_play_tracks(int first, int last, void (*hook_finished)(void)) {
jukebox_play_last = last - 1;
music_filename = JukeboxSongs[jukebox_playing];
if (!music_filename)
return 0;
jukebox_hook_finished = hook_finished ? hook_finished : mix_free_music;
mix_play_file(music_filename, 0, jukebox_hook_next); // have our function handle looping