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

Add some nullchecks to WaveformDisplay

This commit is contained in:
smoogipoo 2017-10-04 19:09:39 +09:00
parent 81960c7b48
commit 5ca4a2d2c8

View File

@ -90,8 +90,8 @@ namespace osu.Game.Screens.Edit.Screens.Compose
n.Texture = texture;
n.Size = DrawSize;
n.Shared = sharedData;
n.Points = waveform.Generate((int)(MathHelper.Clamp(Math.Ceiling(DrawWidth), 0, waveform.MaximumPoints) * resolution));
n.Channels = waveform.Channels;
n.Points = waveform?.Generate((int)(MathHelper.Clamp(Math.Ceiling(DrawWidth), 0, waveform.MaximumPoints) * resolution));
n.Channels = waveform?.Channels ?? 0;
base.ApplyDrawNode(node);
}