Fix remaining nullref

This commit is contained in:
Dean Herbert 2019-08-13 15:04:04 +09:00
parent 2cbdf8c01c
commit b942192e00
1 changed files with 8 additions and 7 deletions

View File

@ -247,13 +247,6 @@ protected override void Update()
}
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
musicController.TrackChanged -= trackChanged;
}
private Action pendingBeatmapSwitch;
private void trackChanged(WorkingBeatmap beatmap, TrackChangeDirection direction = TrackChangeDirection.None)
@ -313,6 +306,14 @@ private void beatmapDisabledChanged(bool disabled)
playlistButton.Enabled.Value = !disabled;
}
protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
if (musicController != null)
musicController.TrackChanged -= trackChanged;
}
private class MusicIconButton : IconButton
{
public MusicIconButton()