mirror of
https://github.com/ppy/osu.git
synced 2025-02-06 21:43:21 +08:00
Fix null reference if hit lighting is disabled
This commit is contained in:
parent
3c9db923b4
commit
13205319f3
@ -60,10 +60,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
|
|
||||||
lightingColour?.UnbindAll();
|
lightingColour?.UnbindAll();
|
||||||
|
|
||||||
if (JudgedObject != null)
|
if (JudgedObject != null && lighting != null)
|
||||||
{
|
{
|
||||||
lightingColour = JudgedObject.AccentColour.GetBoundCopy();
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user