From b47a2a03d5563e71bec072ee3921221af30e35af Mon Sep 17 00:00:00 2001 From: kamp Date: Sat, 7 Nov 2020 01:53:14 +0100 Subject: [PATCH 1/2] Fix nullref when quickdeleting slider that hasn't been selected yet --- .../Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs index 9b758ec898..34dc356bc3 100644 --- a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs @@ -75,7 +75,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders public override bool HandleQuickDeletion() { - var hoveredControlPoint = ControlPointVisualiser.Pieces.FirstOrDefault(p => p.IsHovered); + var hoveredControlPoint = ControlPointVisualiser?.Pieces?.FirstOrDefault(p => p.IsHovered); if (hoveredControlPoint == null) return false; From 42c543472de01cfda43b3f4dfaa41698ced8db52 Mon Sep 17 00:00:00 2001 From: kamp Date: Sat, 7 Nov 2020 01:56:41 +0100 Subject: [PATCH 2/2] Remove unnecessary null coalesce --- .../Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs index 34dc356bc3..7ae4f387ca 100644 --- a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderSelectionBlueprint.cs @@ -75,7 +75,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders public override bool HandleQuickDeletion() { - var hoveredControlPoint = ControlPointVisualiser?.Pieces?.FirstOrDefault(p => p.IsHovered); + var hoveredControlPoint = ControlPointVisualiser?.Pieces.FirstOrDefault(p => p.IsHovered); if (hoveredControlPoint == null) return false;