mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 19:27:26 +08:00
Handle potential null room hosts
This commit is contained in:
parent
1bd08b4a4b
commit
0adad3a599
@ -66,8 +66,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
|
||||
if (currentHostPanel != null && panels.Contains(currentHostPanel))
|
||||
panels.SetLayoutPosition(currentHostPanel, 0);
|
||||
|
||||
currentHostPanel = null;
|
||||
|
||||
// Change position of new host to display above all participants.
|
||||
panels.SetLayoutPosition(currentHostPanel = panels.Single(u => u.User.Equals(Room.Host)), -1);
|
||||
if (Room.Host != null)
|
||||
panels.SetLayoutPosition(currentHostPanel = panels.SingleOrDefault(u => u.User.Equals(Room.Host)), -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user