From efe6245e533cf514dbb6c715aa148f3f8f5a0e17 Mon Sep 17 00:00:00 2001 From: FreezyLemon Date: Sat, 2 Dec 2017 10:42:38 +0100 Subject: [PATCH] Fixed a bug where Drawable.Width could potentially be set to NaN (0/0) by checking if last variable > 0. --- osu.Game/Overlays/BeatmapSet/PreviewButton.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Overlays/BeatmapSet/PreviewButton.cs b/osu.Game/Overlays/BeatmapSet/PreviewButton.cs index 52edd1714f..ef248c02d3 100644 --- a/osu.Game/Overlays/BeatmapSet/PreviewButton.cs +++ b/osu.Game/Overlays/BeatmapSet/PreviewButton.cs @@ -80,7 +80,7 @@ namespace osu.Game.Overlays.BeatmapSet { base.Update(); - if (Playing.Value && preview != null) + if (Playing.Value && preview != null && preview.Length > 0) { progress.Width = (float)(preview.CurrentTime / preview.Length); }