mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 05:22:54 +08:00
Fix potential startup crash due to early application of animations
This was always haphazard code, but by luck it never triggered before drawable load until now. With the recently nullability changes, this would be triggered when `flash` is not yet constructed. Switching to `AddOnce` seems safer to avoid multiple applications, regardless.
This commit is contained in:
parent
57e51f4d5b
commit
f58c69e639
@ -136,11 +136,11 @@ namespace osu.Game.Tournament.Components
|
||||
if (match.NewValue != null)
|
||||
match.NewValue.PicksBans.CollectionChanged += picksBansOnCollectionChanged;
|
||||
|
||||
updateState();
|
||||
Scheduler.AddOnce(updateState);
|
||||
}
|
||||
|
||||
private void picksBansOnCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
|
||||
=> updateState();
|
||||
=> Scheduler.AddOnce(updateState);
|
||||
|
||||
private BeatmapChoice? choice;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user