1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 16:02:58 +08:00

Fix potential nullref

This commit is contained in:
Dean Herbert 2017-05-24 02:53:21 +09:00 committed by GitHub
parent 813b09189c
commit b477e5cd9e

View File

@ -260,7 +260,7 @@ namespace osu.Game.Screens.Menu
{
base.Update();
var maxAmplitude = lastBeatIndex >= 0 ? Beatmap.Value.Track.CurrentAmplitudes.Maximum : 0;
var maxAmplitude = lastBeatIndex >= 0 ? Beatmap.Value?.Track?.CurrentAmplitudes.Maximum ?? 0 : 0;
logoAmplitudeContainer.ScaleTo(1 - maxAmplitude * 0.04f, 50, EasingTypes.OutQuint);
}
@ -312,4 +312,4 @@ namespace osu.Game.Screens.Menu
impactContainer.ScaleTo(1.12f, 250);
}
}
}
}