mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 06:35: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
|
set
|
||||||
{
|
{
|
||||||
|
if (score == null && value == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (score?.Equals(value) == true)
|
if (score?.Equals(value) == true)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -38,6 +38,14 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
get => beatmapInfo;
|
get => beatmapInfo;
|
||||||
set
|
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)
|
if (beatmapInfo?.Equals(value) == true)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user