mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 05:32:56 +08:00
Fix nullref when loading MusicController VisualTest after Player VisualTest
This commit is contained in:
parent
d42aab96d1
commit
8d919e42c9
@ -302,8 +302,8 @@ namespace osu.Game.Overlays
|
||||
else
|
||||
{
|
||||
//figure out the best direction based on order in playlist.
|
||||
var last = playlist.BeatmapSets.TakeWhile(b => b.ID != current.BeatmapSetInfo.ID).Count();
|
||||
var next = beatmap == null ? -1 : playlist.BeatmapSets.TakeWhile(b => b.ID != beatmap.BeatmapSetInfo.ID).Count();
|
||||
var last = playlist.BeatmapSets.TakeWhile(b => b.ID != current.BeatmapSetInfo?.ID).Count();
|
||||
var next = beatmap == null ? -1 : playlist.BeatmapSets.TakeWhile(b => b.ID != beatmap.BeatmapSetInfo?.ID).Count();
|
||||
|
||||
direction = last > next ? TransformDirection.Prev : TransformDirection.Next;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user