Skip to content

Commit

Permalink
Merge pull request #9499 from peppy/fix-better
Browse files Browse the repository at this point in the history
Fix one more nullref
  • Loading branch information
peppy committed Jul 10, 2020
2 parents 6c66197 + dd02526 commit d8b92cc
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuJudgement.cs
Expand Up @@ -60,14 +60,17 @@ protected override void PrepareForUse()

lightingColour?.UnbindAll();

if (JudgedObject != null && lighting != null)
{
lightingColour = JudgedObject.AccentColour.GetBoundCopy();
lightingColour.BindValueChanged(colour => lighting.Colour = Result.Type == HitResult.Miss ? Color4.Transparent : colour.NewValue, true);
}
else
if (lighting != null)
{
lighting.Colour = Color4.White;
if (JudgedObject != null)
{
lightingColour = JudgedObject.AccentColour.GetBoundCopy();
lightingColour.BindValueChanged(colour => lighting.Colour = Result.Type == HitResult.Miss ? Color4.Transparent : colour.NewValue, true);
}
else
{
lighting.Colour = Color4.White;
}
}
}

Expand Down

0 comments on commit d8b92cc

Please sign in to comment.