mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 02:57:25 +08:00
Fix potential cross-thread list access
This commit is contained in:
parent
f876a329b1
commit
9d13a5b06a
@ -309,14 +309,12 @@ namespace osu.Game.Online.RealtimeMultiplayer
|
||||
if (Room == null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
var players = Room.Users.Where(u => u.State == MultiplayerUserState.Playing).Select(u => u.UserID).ToList();
|
||||
|
||||
Schedule(() =>
|
||||
{
|
||||
if (Room == null)
|
||||
return;
|
||||
|
||||
PlayingUsers.AddRange(players);
|
||||
PlayingUsers.AddRange(Room.Users.Where(u => u.State == MultiplayerUserState.Playing).Select(u => u.UserID));
|
||||
|
||||
MatchStarted?.Invoke();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user