mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 00:23:01 +08:00
Add null check
This commit is contained in:
parent
e939f75f4b
commit
e71b13683a
@ -5,6 +5,7 @@ using osu.Framework.Input.Events;
|
||||
using osu.Game.Rulesets.Edit;
|
||||
using osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles.Components;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles
|
||||
{
|
||||
@ -23,7 +24,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.HitCircles
|
||||
base.LoadComplete();
|
||||
|
||||
// Fixes a 1-frame position discrepancy due to the first mouse move event happening in the next frame
|
||||
HitObject.Position = Parent.ToLocalSpace(GetContainingInputManager().CurrentState.Mouse.Position);
|
||||
HitObject.Position = Parent?.ToLocalSpace(GetContainingInputManager().CurrentState.Mouse.Position)?? Vector2.Zero;
|
||||
}
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
|
Loading…
Reference in New Issue
Block a user