Fix potential taiko crash on rewind

This commit is contained in:
smoogipoo
2020-09-25 19:25:58 +09:00
parent 8c45786841
commit acfa62bb50
6 changed files with 34 additions and 35 deletions

View File

@ -15,8 +15,14 @@ namespace osu.Game.Rulesets.Taiko.UI
{
internal class DefaultHitExplosion : CircularContainer
{
[Resolved]
private DrawableHitObject judgedObject { get; set; }
private readonly DrawableHitObject judgedObject;
private readonly HitResult result;
public DefaultHitExplosion(DrawableHitObject judgedObject, HitResult result)
{
this.judgedObject = judgedObject;
this.result = result;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
@ -31,7 +37,7 @@ namespace osu.Game.Rulesets.Taiko.UI
Alpha = 0.15f;
Masking = true;
if (judgedObject.Result.Type == HitResult.Miss)
if (result == HitResult.Miss)
return;
bool isRim = (judgedObject.HitObject as Hit)?.Type == HitType.Rim;