1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 13:33:03 +08:00

Fix potentially null drawable call to SetLayoutPosition

This commit is contained in:
Salman Ahmed 2022-03-19 14:54:58 +03:00
parent 0adad3a599
commit 9afe82a0d5

View File

@ -70,7 +70,12 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Participants
// Change position of new host to display above all participants. // Change position of new host to display above all participants.
if (Room.Host != null) if (Room.Host != null)
panels.SetLayoutPosition(currentHostPanel = panels.SingleOrDefault(u => u.User.Equals(Room.Host)), -1); {
currentHostPanel = panels.SingleOrDefault(u => u.User.Equals(Room.Host));
if (currentHostPanel != null)
panels.SetLayoutPosition(currentHostPanel, -1);
}
} }
} }
} }