1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:25:11 +08:00

Guard against nulls (load not run)

This commit is contained in:
smoogipoo 2020-09-28 17:46:22 +09:00
parent e60e47ff66
commit b6bc829bd5
3 changed files with 9 additions and 3 deletions

View File

@ -188,7 +188,9 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
drawableSpinner.ApplyCustomUpdateState -= updateStateTransforms;
if (drawableSpinner != null)
drawableSpinner.ApplyCustomUpdateState -= updateStateTransforms;
}
}
}

View File

@ -98,7 +98,9 @@ namespace osu.Game.Rulesets.Osu.Skinning
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
drawableSpinner.ApplyCustomUpdateState -= updateStateTransforms;
if (drawableSpinner != null)
drawableSpinner.ApplyCustomUpdateState -= updateStateTransforms;
}
}
}

View File

@ -130,7 +130,9 @@ namespace osu.Game.Rulesets.Osu.Skinning
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
drawableSpinner.ApplyCustomUpdateState -= updateStateTransforms;
if (drawableSpinner != null)
drawableSpinner.ApplyCustomUpdateState -= updateStateTransforms;
}
}
}