mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Don't fail if the local user is not present in room users when updating ready button state
This commit is contained in:
@ -60,7 +60,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
|
|||||||
{
|
{
|
||||||
base.OnRoomUpdated();
|
base.OnRoomUpdated();
|
||||||
|
|
||||||
localUser = Room?.Users.Single(u => u.User?.Id == api.LocalUser.Value.Id);
|
// this method is called on leaving the room, so the local user may not exist in the room any more.
|
||||||
|
localUser = Room?.Users.SingleOrDefault(u => u.User?.Id == api.LocalUser.Value.Id);
|
||||||
|
|
||||||
button.Enabled.Value = Client.Room?.State == MultiplayerRoomState.Open;
|
button.Enabled.Value = Client.Room?.State == MultiplayerRoomState.Open;
|
||||||
updateState();
|
updateState();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user