1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 17:13:06 +08:00

Fix one more nullref

This commit is contained in:
Dean Herbert 2020-07-10 22:48:34 +09:00
parent 6c661973a6
commit dd025262d0

View File

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