mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 21:13:01 +08:00
Avoid accessing beatmaps from BeatSyncedContainer until they are loaded
This commit is contained in:
parent
d75e3d8e81
commit
b3aae2340b
@ -35,9 +35,12 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
var track = Beatmap.Value.Track;
|
||||
if (!Beatmap.Value.TrackLoaded || !Beatmap.Value.BeatmapLoaded) return;
|
||||
|
||||
if (track == null)
|
||||
var track = Beatmap.Value.Track;
|
||||
var beatmap = Beatmap.Value.Beatmap;
|
||||
|
||||
if (track == null || beatmap == null)
|
||||
return;
|
||||
|
||||
double currentTrackTime = track.Length > 0 ? track.CurrentTime + EarlyActivationMilliseconds : Clock.CurrentTime;
|
||||
|
Loading…
Reference in New Issue
Block a user