diff --git a/source/funkin/ui/story/Level.hx b/source/funkin/ui/story/Level.hx index 83682fec9..7913ac8ca 100644 --- a/source/funkin/ui/story/Level.hx +++ b/source/funkin/ui/story/Level.hx @@ -71,7 +71,12 @@ class Level implements IRegistryEntry { var songList:Array = getSongs() ?? []; var songNameList:Array = songList.map(function(songId) { - return funkin.play.song.SongData.SongDataParser.fetchSong(songId) ?.getDifficulty(difficulty) ?.songName ?? 'Unknown'; + var song:Song = funkin.play.song.SongData.SongDataParser.fetchSong(songId); + if (song == null) return 'Unknown'; + var songDifficulty:SongDifficulty = song.getDifficulty(difficulty); + if (songDifficulty == null) songDifficulty = song.getDifficulty(); + var songName:String = songDifficulty?.songName; + return songName ?? 'Unknown'; }); return songNameList; }