mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +08:00
Ensure DrawableHitObject's HitObject is not null
This commit is contained in:
parent
b5997f2231
commit
9f004186d5
@ -5,6 +5,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.TypeExtensions;
|
||||
@ -89,9 +90,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
|
||||
public IBindable<ArmedState> State => state;
|
||||
|
||||
protected DrawableHitObject(HitObject hitObject)
|
||||
protected DrawableHitObject([NotNull] HitObject hitObject)
|
||||
{
|
||||
HitObject = hitObject;
|
||||
HitObject = hitObject ?? throw new ArgumentNullException(nameof(hitObject));
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
Loading…
Reference in New Issue
Block a user