1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-26 02:29:54 +08:00

Fix MultiplayerMatchSubScreen mutating mods outside of bindable lease

As seen at https://github.com/peppy/osu/runs/4674501626?check_suite_focus=true.
This commit is contained in:
Dean Herbert
2022-01-01 12:08:49 +09:00
Unverified
parent f656e7d2d2
commit 675bdd3213
2 changed files with 2 additions and 2 deletions
@@ -381,7 +381,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
protected virtual void UpdateMods()
{
if (SelectedItem.Value == null)
if (SelectedItem.Value == null || !this.IsCurrentScreen())
return;
Mods.Value = UserMods.Value.Concat(SelectedItem.Value.RequiredMods).ToList();
@@ -241,7 +241,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
protected override void UpdateMods()
{
if (SelectedItem.Value == null || client.LocalUser == null)
if (SelectedItem.Value == null || client.LocalUser == null || !this.IsCurrentScreen())
return;
// update local mods based on room's reported status for the local user (omitting the base call implementation).