mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:52:53 +08:00
fix crash from dragging near zero-length repeating object in timeline
This commit is contained in:
parent
ec578e1d9f
commit
c167f10ad5
@ -409,7 +409,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
double lengthOfOneRepeat = repeatHitObject.Duration / (repeatHitObject.RepeatCount + 1);
|
||||
int proposedCount = Math.Max(0, (int)Math.Round(proposedDuration / lengthOfOneRepeat) - 1);
|
||||
|
||||
if (proposedCount == repeatHitObject.RepeatCount || lengthOfOneRepeat == 0)
|
||||
if (proposedCount == repeatHitObject.RepeatCount || Precision.AlmostEquals(lengthOfOneRepeat, 0))
|
||||
return;
|
||||
|
||||
repeatHitObject.RepeatCount = proposedCount;
|
||||
|
Loading…
Reference in New Issue
Block a user