Replace assertion with soft null check

Surrounding `OnDrag{Start,End}` methods did so already.
This commit is contained in:
Bartłomiej Dach
2021-12-22 10:28:35 +01:00
parent 6330fa5dc5
commit c3fada1926

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
using JetBrains.Annotations; using JetBrains.Annotations;
using osu.Framework.Allocation; using osu.Framework.Allocation;
@ -167,8 +166,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
protected override void OnDrag(DragEvent e) protected override void OnDrag(DragEvent e)
{ {
Debug.Assert(placementControlPoint != null); if (placementControlPoint != null)
placementControlPoint.Position = e.MousePosition - HitObject.Position; placementControlPoint.Position = e.MousePosition - HitObject.Position;
} }