mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Fix div-by-zero in SongProgress
when no object duration could be calculated
This commit is contained in:
parent
0d3cda3329
commit
623e90a7b2
@ -94,7 +94,10 @@ namespace osu.Game.Screens.Play.HUD
|
||||
double objectOffsetCurrent = currentTime - FirstHitTime;
|
||||
|
||||
double objectDuration = LastHitTime - FirstHitTime;
|
||||
UpdateProgress(objectOffsetCurrent / objectDuration, false);
|
||||
if (objectDuration == 0)
|
||||
UpdateProgress(0, false);
|
||||
else
|
||||
UpdateProgress(objectOffsetCurrent / objectDuration, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user