mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 21:23:04 +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))
|
if (currentHostPanel != null && panels.Contains(currentHostPanel))
|
||||||
panels.SetLayoutPosition(currentHostPanel, 0);
|
panels.SetLayoutPosition(currentHostPanel, 0);
|
||||||
|
|
||||||
|
currentHostPanel = null;
|
||||||
|
|
||||||
// Change position of new host to display above all participants.
|
// 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