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

Fix hit object selection blueprint potential null reference

This commit is contained in:
ekrctb 2021-07-07 21:02:11 +09:00
parent 341cb09c6e
commit 663ffae42f

View File

@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Edit
/// </summary>
protected virtual bool AlwaysShowWhenSelected => false;
protected override bool ShouldBeAlive => (DrawableObject.IsAlive && DrawableObject.IsPresent) || (AlwaysShowWhenSelected && State == SelectionState.Selected);
protected override bool ShouldBeAlive => (DrawableObject?.IsAlive == true && DrawableObject.IsPresent) || (AlwaysShowWhenSelected && State == SelectionState.Selected);
protected HitObjectSelectionBlueprint(HitObject hitObject)
: base(hitObject)