From: Holger Schemel Date: Thu, 8 Jun 2023 00:09:24 +0000 (+0200) Subject: fixed crash bug on info screen if music set has no unconfigured music X-Git-Tag: 4.3.7.0~50 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=78a2d1d2a6926a1e101bd5e21b667c81cfd230bb;p=rocksndiamonds.git fixed crash bug on info screen if music set has no unconfigured music --- diff --git a/src/files.c b/src/files.c index c934db0f..627cafc0 100644 --- a/src/files.c +++ b/src/files.c @@ -12985,13 +12985,17 @@ void LoadMusicInfo(void) // get music file info for configured level music music_nr = levelset.music[i]; } - else + else if (num_music_noconf > 0) { // get music file info for unconfigured level music int level_pos = i - leveldir_current->first_level; music_nr = MAP_NOCONF_MUSIC(level_pos % num_music_noconf); } + else + { + continue; + } char *basename = getMusicInfoEntryFilename(music_nr);