Fix a couple of cases of incorrect equality checks in the case both values are null

This commit is contained in:
Dean Herbert 2022-01-28 14:18:10 +09:00
parent d1158acb82
commit b7d8c9bf06
2 changed files with 11 additions and 0 deletions

View File

@ -107,6 +107,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
{
set
{
if (score == null && value == null)
return;
if (score?.Equals(value) == true)
return;

View File

@ -38,6 +38,14 @@ namespace osu.Game.Screens.Select.Leaderboards
get => beatmapInfo;
set
{
if (beatmapInfo == null && value == null)
{
// always null scores to ensure a correct initial display.
// see weird `scoresLoadedOnce` logic in base implementation.
Scores = null;
return;
}
if (beatmapInfo?.Equals(value) == true)
return;