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:
parent
cf5f5a4de3
commit
30f9cc46a7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user