mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
Add client/room null check
This commit is contained in:
parent
169acb42de
commit
86682cdb34
@ -336,7 +336,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
{
|
||||
// Debounce changes to mod settings so as to not thrash the network.
|
||||
debouncedModSettingsUpdate?.Cancel();
|
||||
debouncedModSettingsUpdate = Scheduler.AddDelayed(() => client.ChangeUserMods(UserMods.Value), 500);
|
||||
debouncedModSettingsUpdate = Scheduler.AddDelayed(() =>
|
||||
{
|
||||
if (client.Room == null)
|
||||
return;
|
||||
|
||||
client.ChangeUserMods(UserMods.Value);
|
||||
}, 500);
|
||||
}
|
||||
|
||||
private void updateBeatmapAvailability(ValueChangedEvent<BeatmapAvailability> availability)
|
||||
|
Loading…
Reference in New Issue
Block a user