1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-10 21:40:34 +08:00

Cancel ApplyDefaults() when requested

Also didn't notice a particular case here, but if all code passes up
until we get to the `foreach (var h in nestedHitObjects)` below, then we
could end up stuck here for quite a while.
This commit is contained in:
Dan Balasescu 2025-03-03 14:46:13 +09:00
parent 52dad09b20
commit 033952029e
No known key found for this signature in database

View File

@ -104,6 +104,8 @@ namespace osu.Game.Rulesets.Objects
/// <param name="cancellationToken">The cancellation token.</param>
public void ApplyDefaults(ControlPointInfo controlPointInfo, IBeatmapDifficultyInfo difficulty, CancellationToken cancellationToken = default)
{
cancellationToken.ThrowIfCancellationRequested();
ApplyDefaultsToSelf(controlPointInfo, difficulty);
nestedHitObjects.Clear();