mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Fix playlist settings reference leak due to unsafe callback binding
This commit is contained in:
parent
01cc9bd7ef
commit
c851e3d8f3
@ -78,6 +78,8 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
||||
[Resolved]
|
||||
private IAPIProvider api { get; set; }
|
||||
|
||||
private IBindable<APIUser> localUser;
|
||||
|
||||
private readonly Room room;
|
||||
|
||||
public MatchSettings(Room room)
|
||||
@ -304,7 +306,8 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
||||
MaxAttempts.BindValueChanged(count => MaxAttemptsField.Text = count.NewValue?.ToString(), true);
|
||||
Duration.BindValueChanged(duration => DurationField.Current.Value = duration.NewValue ?? TimeSpan.FromMinutes(30), true);
|
||||
|
||||
api.LocalUser.BindValueChanged(populateDurations, true);
|
||||
localUser = api.LocalUser.GetBoundCopy();
|
||||
localUser.BindValueChanged(populateDurations, true);
|
||||
|
||||
playlist.Items.BindTo(Playlist);
|
||||
Playlist.BindCollectionChanged(onPlaylistChanged, true);
|
||||
|
Loading…
Reference in New Issue
Block a user