From e71b13683a1189ae8fda808b2b2f22674e651900 Mon Sep 17 00:00:00 2001 From: ProgrammaticNajel Date: Sat, 26 Jan 2019 22:55:33 +0800 Subject: [PATCH] Add null check --- .../Edit/Blueprints/HitCircles/HitCirclePlacementBlueprint.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Edit/Blueprints/HitCircles/HitCirclePlacementBlueprint.cs b/osu.Game.Rulesets.Osu/Edit/Blueprints/HitCircles/HitCirclePlacementBlueprint.cs index ee28f4ae6b..07c3132282 100644 --- a/osu.Game.Rulesets.Osu/Edit/Blueprints/HitCircles/HitCirclePlacementBlueprint.cs +++ b/osu.Game.Rulesets.Osu/Edit/Blueprints/HitCircles/HitCirclePlacementBlueprint.cs @@ -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)