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:
parent
b9e38269e3
commit
d27edb3a25
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user