mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 11:02:54 +08:00
Fix possible nullrefs
This commit is contained in:
parent
1952fcc0ce
commit
3cd353d387
@ -81,15 +81,15 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
||||
}
|
||||
};
|
||||
|
||||
var holdNote = (DrawableHoldNote)drawableObject;
|
||||
|
||||
if (drawableObject != null)
|
||||
{
|
||||
var holdNote = (DrawableHoldNote)drawableObject;
|
||||
|
||||
AccentColour.BindTo(drawableObject.AccentColour);
|
||||
AccentColour.BindValueChanged(onAccentChanged, true);
|
||||
isHitting.BindTo(holdNote.IsHitting);
|
||||
}
|
||||
|
||||
isHitting.BindTo(holdNote.IsHitting);
|
||||
AccentColour.BindValueChanged(onAccentChanged, true);
|
||||
isHitting.BindValueChanged(_ => onAccentChanged(new ValueChangedEvent<Color4>(AccentColour.Value, AccentColour.Value)), true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user