mirror of https://github.com/ppy/osu
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 @@ private void matchChanged(ValueChangedEvent<TournamentMatch?> match)
|
|||
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