From 78a2d1d2a6926a1e101bd5e21b667c81cfd230bb Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 8 Jun 2023 02:09:24 +0200 Subject: [PATCH] fixed crash bug on info screen if music set has no unconfigured music --- src/files.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.34.1