1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

Fix null reference if hit lighting is disabled

This commit is contained in:
Dean Herbert 2020-07-10 22:37:29 +09:00
parent 3c9db923b4
commit 13205319f3

View File

@ -60,10 +60,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
lightingColour?.UnbindAll();
if (JudgedObject != null)
if (JudgedObject != null && lighting != null)
{
lightingColour = JudgedObject.AccentColour.GetBoundCopy();
lightingColour.BindValueChanged(colour => lighting.Colour = Result.Type == HitResult.Miss ? Color4.Transparent : colour.NewValue, true);
lightingColour.BindValueChanged(colour => lighting.Colour = Result?.Type == HitResult.Miss ? Color4.Transparent : colour.NewValue, true);
}
else
{