mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:07:38 +08:00
Fix potential nullref
This commit is contained in:
parent
f1d7e7e7f6
commit
31313ec9e1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user