From 0b922365bb58ec3834f9163d2843daacde8eb89d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 17 Feb 2017 15:27:42 +0900 Subject: [PATCH] Fix nullref due to missing controlPoints. --- osu.Game.Modes.Osu/Objects/Slider.cs | 2 +- osu.Game/Beatmaps/Beatmap.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Modes.Osu/Objects/Slider.cs b/osu.Game.Modes.Osu/Objects/Slider.cs index c3d8190240..daf4fd7138 100644 --- a/osu.Game.Modes.Osu/Objects/Slider.cs +++ b/osu.Game.Modes.Osu/Objects/Slider.cs @@ -59,7 +59,7 @@ namespace osu.Game.Modes.Osu.Objects var velocityAdjustment = overridePoint?.VelocityAdjustment ?? 1; var baseVelocity = 100 * baseDifficulty.SliderMultiplier; - Velocity = baseVelocity / (timingPoint.BeatLength * velocityAdjustment); + Velocity = baseVelocity / ((timingPoint?.BeatLength ?? 500) * velocityAdjustment); TickDistance = baseVelocity / (baseDifficulty.SliderTickRate * velocityAdjustment); } diff --git a/osu.Game/Beatmaps/Beatmap.cs b/osu.Game/Beatmaps/Beatmap.cs index d0ce290bad..5ddfadbc96 100644 --- a/osu.Game/Beatmaps/Beatmap.cs +++ b/osu.Game/Beatmaps/Beatmap.cs @@ -39,7 +39,7 @@ namespace osu.Game.Beatmaps ControlPoint timingPoint = null; foreach (var controlPoint in ControlPoints) - if (controlPoint.Time <= time) + if (controlPoint.Time <= time || timingPoint == null) { if (controlPoint.TimingChange) {