mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 13:22:55 +08:00
Merge pull request #6560 from peppy/dho-ho-not-null
Ensure DrawableHitObject's HitObject is not null
This commit is contained in:
commit
8210759039
@ -239,7 +239,7 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
|||||||
private class TestStrongNestedHit : DrawableStrongNestedHit
|
private class TestStrongNestedHit : DrawableStrongNestedHit
|
||||||
{
|
{
|
||||||
public TestStrongNestedHit(DrawableHitObject mainObject)
|
public TestStrongNestedHit(DrawableHitObject mainObject)
|
||||||
: base(null, mainObject)
|
: base(new StrongHitObject { StartTime = mainObject.HitObject.StartTime }, mainObject)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Extensions.TypeExtensions;
|
using osu.Framework.Extensions.TypeExtensions;
|
||||||
@ -89,9 +90,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
|||||||
|
|
||||||
public IBindable<ArmedState> State => state;
|
public IBindable<ArmedState> State => state;
|
||||||
|
|
||||||
protected DrawableHitObject(HitObject hitObject)
|
protected DrawableHitObject([NotNull] HitObject hitObject)
|
||||||
{
|
{
|
||||||
HitObject = hitObject;
|
HitObject = hitObject ?? throw new ArgumentNullException(nameof(hitObject));
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
|
Loading…
Reference in New Issue
Block a user