1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 02:42:54 +08:00

Add precautionary null checks to update methods in SongSelect

This commit is contained in:
Dean Herbert 2021-01-03 12:18:35 +09:00
parent e2de5bb8f9
commit caa5109e3a

View File

@ -428,7 +428,7 @@ namespace osu.Game.Screens.Select
private void updateSelectedBeatmap(BeatmapInfo beatmap) private void updateSelectedBeatmap(BeatmapInfo beatmap)
{ {
if (beatmap?.Equals(beatmapNoDebounce) == true) if (beatmap == null || beatmap.Equals(beatmapNoDebounce))
return; return;
beatmapNoDebounce = beatmap; beatmapNoDebounce = beatmap;
@ -438,7 +438,7 @@ namespace osu.Game.Screens.Select
private void updateSelectedRuleset(RulesetInfo ruleset) private void updateSelectedRuleset(RulesetInfo ruleset)
{ {
if (ruleset?.Equals(rulesetNoDebounce) == true) if (ruleset == null || ruleset.Equals(rulesetNoDebounce))
return; return;
rulesetNoDebounce = ruleset; rulesetNoDebounce = ruleset;