1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:28:00 +08:00

Null-check drawingSettingsProvider

As it's annotated as an optional dependency.
This commit is contained in:
Bartłomiej Dach 2023-11-20 12:41:22 +09:00
parent 7820c8ce4d
commit 518dcc567b
No known key found for this signature in database

View File

@ -80,19 +80,22 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
base.LoadComplete();
inputManager = GetContainingInputManager();
drawingSettingsProvider.Tolerance.BindValueChanged(e =>
if (drawingSettingsProvider != null)
{
if (bSplineBuilder.Tolerance != e.NewValue)
bSplineBuilder.Tolerance = e.NewValue;
updateSliderPathFromBSplineBuilder();
}, true);
drawingSettingsProvider.Tolerance.BindValueChanged(e =>
{
if (bSplineBuilder.Tolerance != e.NewValue)
bSplineBuilder.Tolerance = e.NewValue;
updateSliderPathFromBSplineBuilder();
}, true);
drawingSettingsProvider.CornerThreshold.BindValueChanged(e =>
{
if (bSplineBuilder.CornerThreshold != e.NewValue)
bSplineBuilder.CornerThreshold = e.NewValue;
updateSliderPathFromBSplineBuilder();
}, true);
drawingSettingsProvider.CornerThreshold.BindValueChanged(e =>
{
if (bSplineBuilder.CornerThreshold != e.NewValue)
bSplineBuilder.CornerThreshold = e.NewValue;
updateSliderPathFromBSplineBuilder();
}, true);
}
}
[Resolved]