mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:25:05 +08:00
Merge pull request #16677 from peppy/fix-incorrect-null-null-equality
Fix a couple of cases of incorrect equality checks in the case both values are null
This commit is contained in:
commit
ea716194e9
@ -107,6 +107,9 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
|
||||
{
|
||||
set
|
||||
{
|
||||
if (score == null && value == null)
|
||||
return;
|
||||
|
||||
if (score?.Equals(value) == true)
|
||||
return;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user