mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 23:13:20 +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)
|
private void adjustOffset(double adjust)
|
||||||
{
|
{
|
||||||
|
if (selectedGroup.Value == null)
|
||||||
|
return;
|
||||||
|
|
||||||
bool wasAtStart = editorClock.CurrentTimeAccurate == selectedGroup.Value.Time;
|
bool wasAtStart = editorClock.CurrentTimeAccurate == selectedGroup.Value.Time;
|
||||||
|
|
||||||
// VERY TEMPORARY
|
// VERY TEMPORARY
|
||||||
@ -222,7 +225,7 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
|
|
||||||
private void adjustBpm(double adjust)
|
private void adjustBpm(double adjust)
|
||||||
{
|
{
|
||||||
var timing = selectedGroup.Value.ControlPoints.OfType<TimingControlPoint>().FirstOrDefault();
|
var timing = selectedGroup.Value?.ControlPoints.OfType<TimingControlPoint>().FirstOrDefault();
|
||||||
|
|
||||||
if (timing == null)
|
if (timing == null)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user