1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Fix another potential crash from async load

This commit is contained in:
Dan Balasescu 2021-11-16 00:31:35 +09:00
parent b9e38269e3
commit d27edb3a25

View File

@ -102,6 +102,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
private readonly Room room;
private Drawable playlistContainer;
private DrawableRoomPlaylist drawablePlaylist;
public MatchSettings(Room room)
{
@ -256,12 +257,10 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
Spacing = new Vector2(5),
Children = new Drawable[]
{
new DrawableRoomPlaylist(false, false)
drawablePlaylist = new DrawableRoomPlaylist(false, false)
{
RelativeSizeAxes = Axes.X,
Height = DrawableRoomPlaylistItem.HEIGHT,
Items = { BindTarget = Playlist },
SelectedItem = { BindTarget = SelectedItem }
Height = DrawableRoomPlaylistItem.HEIGHT
},
new PurpleTriangleButton
{
@ -348,6 +347,14 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
});
}
protected override void LoadComplete()
{
base.LoadComplete();
drawablePlaylist.Items.BindTo(Playlist);
drawablePlaylist.SelectedItem.BindTo(SelectedItem);
}
protected override void Update()
{
base.Update();