1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 21:23:19 +08:00

Merge pull request #16291 from peppy/fix-mods-mutated-outside-lease

Fix `MultiplayerMatchSubScreen` mutating mods outside of bindable lease
This commit is contained in:
Dan Balasescu 2022-01-07 17:12:12 +09:00 committed by GitHub
commit bf328dc9e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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).