Guard against potentially null track if ever

This commit is contained in:
Salman Ahmed 2021-05-07 08:30:50 +03:00
parent 37f44d2e37
commit b1134c3857
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ private void load(OsuColour colours, OsuConfigManager config)
// Todo: should probably be done at a DrawableRuleset level to share logic with Player.
clock = new EditorClock(playableBeatmap, beatDivisor) { IsCoupled = false };
clock.ChangeSource(loadableBeatmap.Track);
clock.ChangeSource((IAdjustableClock)loadableBeatmap.Track ?? new StopwatchClock());
dependencies.CacheAs(clock);
AddInternal(clock);