1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:02:55 +08:00

Fix potential nullref

This commit is contained in:
smoogipoo 2019-10-18 17:56:31 +09:00
parent f1d7e7e7f6
commit 31313ec9e1

View File

@ -240,7 +240,8 @@ namespace osu.Game.Rulesets.Edit
public void BeginPlacement(HitObject hitObject)
{
hitObject.StartTime = GetSnappedTime(hitObject.StartTime, inputManager.CurrentState.Mouse.Position);
if (distanceSnapGrid != null)
hitObject.StartTime = GetSnappedTime(hitObject.StartTime, distanceSnapGrid.ToLocalSpace(inputManager.CurrentState.Mouse.Position));
}
public void EndPlacement(HitObject hitObject) => EditorBeatmap.Add(hitObject);