1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:20:04 +08:00

Protect offset and bpm adjustments from null selection too

This commit is contained in:
Bartłomiej Dach 2022-11-23 17:22:40 +01:00
parent cf5f5a4de3
commit 30f9cc46a7
No known key found for this signature in database

View File

@ -201,6 +201,9 @@ namespace osu.Game.Screens.Edit.Timing
private void adjustOffset(double adjust)
{
if (selectedGroup.Value == null)
return;
bool wasAtStart = editorClock.CurrentTimeAccurate == selectedGroup.Value.Time;
// VERY TEMPORARY
@ -222,7 +225,7 @@ namespace osu.Game.Screens.Edit.Timing
private void adjustBpm(double adjust)
{
var timing = selectedGroup.Value.ControlPoints.OfType<TimingControlPoint>().FirstOrDefault();
var timing = selectedGroup.Value?.ControlPoints.OfType<TimingControlPoint>().FirstOrDefault();
if (timing == null)
return;