Fixed a bug where Drawable.Width could potentially be set to NaN (0/0) by checking if last variable > 0.

This commit is contained in:
FreezyLemon 2017-12-02 10:42:38 +01:00
parent 6d9dcc6691
commit efe6245e53

View File

@ -80,7 +80,7 @@ namespace osu.Game.Overlays.BeatmapSet
{ {
base.Update(); base.Update();
if (Playing.Value && preview != null) if (Playing.Value && preview != null && preview.Length > 0)
{ {
progress.Width = (float)(preview.CurrentTime / preview.Length); progress.Width = (float)(preview.CurrentTime / preview.Length);
} }